[Mesa-dev] [PATCH 09/18] anv/allocator: Add support for "back" allocations to state_pool

2017-04-26 Thread Jason Ekstrand
--- src/intel/vulkan/anv_allocator.c | 31 +-- src/intel/vulkan/anv_private.h | 4 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index b576101..835bcfa 100644 ---

[Mesa-dev] [PATCH 13/18] anv/allocator: Rework a comment

2017-04-26 Thread Jason Ekstrand
This commit just fixes up the English a bit and re-flows the comment. --- src/intel/vulkan/anv_allocator.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 05666ec..fa7101b 100644 ---

[Mesa-dev] [PATCH 11/18] anv/allocator: Get rid of the ability to free blocks

2017-04-26 Thread Jason Ekstrand
Now that everything is going through the state pools, the block pool no longer needs to be able to handle re-use. --- src/intel/vulkan/anv_allocator.c | 33 ++--- src/intel/vulkan/anv_private.h | 3 --- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git

[Mesa-dev] [PATCH 08/18] anv/allocator: Drop the block_size field from block_pool

2017-04-26 Thread Jason Ekstrand
Since the state_stream is now pulling from a state_pool, the only thing pulling directly off the block pool is the state pool so we can just move the block_size there. The one exception is when we allocate binding tables but we can just reference the state pool there as well. The only functional

[Mesa-dev] [PATCH 07/18] anv/allocator: Pull the userptr part of block_pool_grow into a helper

2017-04-26 Thread Jason Ekstrand
--- src/intel/vulkan/anv_allocator.c | 195 +-- 1 file changed, 104 insertions(+), 91 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index a168af5..183d2cb 100644 --- a/src/intel/vulkan/anv_allocator.c +++

[Mesa-dev] [PATCH 10/18] anv: Allocate binding table blocks through the state pool

2017-04-26 Thread Jason Ekstrand
--- src/intel/vulkan/anv_batch_chain.c | 47 +- src/intel/vulkan/anv_private.h | 2 +- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 28193c5..3714d05 100644

[Mesa-dev] [PATCH 02/18] anv/allocator: Return a null state for zero-size allocations

2017-04-26 Thread Jason Ekstrand
--- src/intel/vulkan/anv_allocator.c | 9 + src/intel/vulkan/anv_private.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 594cf49..d93d4c9 100644 --- a/src/intel/vulkan/anv_allocator.c +++

[Mesa-dev] [PATCH 00/18] anv: Rework the allocation data structures

2017-04-26 Thread Jason Ekstrand
This absurdly long series does something fairly simple: It pulls the block_pool into the state_pool and makes the state pool capable of allocating states larger than the block size. Unfortunately, there was no good way to do it in less than 18 patches. :-( Cc: Juan A. Suarez Romero

[Mesa-dev] [PATCH 06/18] anv/allocator: Roll fixed_size_state_pool into state_pool

2017-04-26 Thread Jason Ekstrand
The helper functions aren't really gaining us as much as they claim and are actually about to be in the way. --- src/intel/vulkan/anv_allocator.c | 85 +--- 1 file changed, 35 insertions(+), 50 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c

[Mesa-dev] [PATCH 05/18] anv/allocator: Remove the state_size field from fixed_size_state_pool

2017-04-26 Thread Jason Ekstrand
--- src/intel/vulkan/anv_allocator.c | 21 ++--- src/intel/vulkan/anv_private.h | 1 - 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 2dad400..7091fd4 100644 ---

[Mesa-dev] [PATCH 04/18] anv: Get rid of a bunch of uses of size_t

2017-04-26 Thread Jason Ekstrand
We should only use size_t when referring to sizes of bits of CPU memory. Anything on the GPU or just a regular array length should be a type that has the same size on both 32 and 64-bit architectures. For state objects, we use a uint32_t because we'll never allocate a piece of driver-internal GPU

[Mesa-dev] [PATCH 03/18] anv/allocator: Convert the state stream to pull from a state pool

2017-04-26 Thread Jason Ekstrand
--- src/intel/vulkan/anv_allocator.c | 71 +-- src/intel/vulkan/anv_cmd_buffer.c | 8 ++-- src/intel/vulkan/anv_descriptor_set.c | 4 +- src/intel/vulkan/anv_private.h| 21 ++- 4 files changed, 52 insertions(+), 52 deletions(-) diff

[Mesa-dev] [PATCH 01/18] anv/allocator: Add no-valgrind versions of state_pool_alloc/free

2017-04-26 Thread Jason Ekstrand
--- src/intel/vulkan/anv_allocator.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 784191e..594cf49 100644 --- a/src/intel/vulkan/anv_allocator.c +++

Re: [Mesa-dev] [PATCH 1/4] r600g: avoid redundant DB register updates

2017-04-26 Thread Marc Dietrich
Am Mittwoch, 26. April 2017, 16:16:35 CEST schrieb Constantine Kharlamov: > Thank you for testing! What is "UH4" btw? old GL3.3 benchmark Unigine Heaven 4.0 https://benchmark.unigine.com/heaven Marc > > On 26.04.2017 17:03, Marc Dietrich wrote: > > Am Dienstag, 25. April 2017, 13:59:44 CEST

Re: [Mesa-dev] [PATCH 1/4] r600g: avoid redundant DB register updates

2017-04-26 Thread Constantine Kharlamov
Thank you for testing! What is "UH4" btw? On 26.04.2017 17:03, Marc Dietrich wrote: > Am Dienstag, 25. April 2017, 13:59:44 CEST schrieb Constantine Kharlamov: >> Split out of "avoid redundant CB register updates" for easier review. >> >> Signed-off-by: Constantine Kharlamov

Re: [Mesa-dev] [PATCH v2 11/31] glsl: fix std140/std430 interfaces for bindless samplers/images

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 12:19 PM, Samuel Pitoiset wrote: On 04/26/2017 04:44 AM, Timothy Arceri wrote: Can we just update is_scalar instead? That should work but only if vector_elements is 1 for samplers. With https://lists.freedesktop.org/archives/mesa-dev/2017-April/153166.html and with

Re: [Mesa-dev] EGL: Question about deferred context and surface destroy

2017-04-26 Thread Mike Gorchak
Hi Tapani, Sure, I can share them, but they are QNX based. And as far as I remember it was an issue in the past :) I think the simplest way for you is to add following calls to function eglutCreateWindow(): https://cgit.freedesktop.org/mesa/demos/tree/src/egl/eglut/eglut.c#n321 if

Re: [Mesa-dev] [PATCH 1/4] r600g: avoid redundant DB register updates

2017-04-26 Thread Marc Dietrich
Am Dienstag, 25. April 2017, 13:59:44 CEST schrieb Constantine Kharlamov: > Split out of "avoid redundant CB register updates" for easier review. > > Signed-off-by: Constantine Kharlamov > Tested-by: Dieter Nützel > --- This one generates GPU crashes

Re: [Mesa-dev] [PATCH v2 3/4] nvc0: Add new launch descriptor format for GP100

2017-04-26 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Wed, Apr 26, 2017 at 9:21 AM, Boyan Ding wrote: > v2: > Also handle the the new format in indirect dispatch > Use compute class check instead of chipset check > > Signed-off-by: Boyan Ding > --- >

Re: [Mesa-dev] [Mesa-stable] [PATCH] swr: MSAA fixes: piglit crashes, additional formats, improve perf.

2017-04-26 Thread Emil Velikov
Hi Bruce, On 26 April 2017 at 14:24, Bruce Cherniak wrote: > This patch moves msaa resolve down into core/StoreTiles where it can > take advantage of all the surface formats - previous resolve > was limited to 8-bit unsigned. This fixes a number of piglit msaa > tests

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2017-04-26 Thread Emil Velikov
On 26 April 2017 at 12:56, Jean Hertel wrote: >>On 2017-04-26 at 08:13, Emil Velikov wrote: > >>Thanks again for doing this Jean. A handful of, mostly trivial, questions. >> >> - Is there a website where one can check the output of specific

[Mesa-dev] [PATCH] swr: MSAA fixes: piglit crashes, additional formats, improve perf.

2017-04-26 Thread Bruce Cherniak
This patch moves msaa resolve down into core/StoreTiles where it can take advantage of all the surface formats - previous resolve was limited to 8-bit unsigned. This fixes a number of piglit msaa tests that were crashing. MSAA performance is also greatly improved because resolve is done in

[Mesa-dev] [PATCH v2 3/4] nvc0: Add new launch descriptor format for GP100

2017-04-26 Thread Boyan Ding
v2: Also handle the the new format in indirect dispatch Use compute class check instead of chipset check Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 164 +++- src/gallium/drivers/nouveau/nvc0/nve4_compute.h | 67

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2017-04-26 Thread Emil Velikov
On 26 April 2017 at 12:18, Eric Engestrom wrote: > On Wednesday, 2017-04-26 12:13:17 +0100, Emil Velikov wrote: >> Eric, >> Not sure that squashing 200+ changes (resulting in a total of +37K >> -41K change stat) in one big blob is a wise move. >> Since those are going

Re: [Mesa-dev] [PATCH 3/3 v2] r600g: get rid of dummy pixel shader

2017-04-26 Thread tournier.elie
Hello, I'm not an r600g person but I will be pleased to have a look to this work. I'm currently working on the fp64 for r600g. Hope to be able to send a series in fews days. The fp64 code is not HW specific, I can test it on my laptop with an Intel card. I don't even own a r600g card. Have a

[Mesa-dev] [PATCH v3] egl: implement eglQueryDmaBufModifiersEXT

2017-04-26 Thread Varad Gautam
query and return supported dmabuf format modifiers for EGL_EXT_image_dma_buf_import_modifiers. v2: rebase to master. v3: move format check to the driver instead of making format queries from here and then checking. Signed-off-by: Varad Gautam ---

[Mesa-dev] [PATCH v3] st/dri: support format modifier queries

2017-04-26 Thread Varad Gautam
From: Varad Gautam ask the driver for supported modifiers for a given format. bump __DRIimageExtension to 16. v2: move to __DRIimageExtension v16. v3: fail if the supplied format is not supported by driver. Signed-off-by: Varad Gautam

[Mesa-dev] [PATCH v3] egl: implement eglQueryDmaBufFormatsEXT

2017-04-26 Thread Varad Gautam
From: Varad Gautam allow egl clients to query the dmabuf formats supported on this platform. v2: rebase to master. v3: return EGL_FALSE upon failure. Signed-off-by: Louis-Francis Ratté-Boulianne Signed-off-by: Varad Gautam

[Mesa-dev] [PATCH v3] gallium: introduce dmabuf format and modifier querying

2017-04-26 Thread Varad Gautam
allows drivers to be queried for supported formats and format modifiers for EGL_EXT_image_dma_buf_import_modifiers. drivers that implement format/modifier queries must advertise these under PIPE_CAP_QUERY_DMABUF_ATTRIBS. v2: rebase to master. v3: drivers must return false on query failure.

[Mesa-dev] [PATCH v3] dri: add queryDmaBufFormats and queryDmaBufModifiers to DRIimage

2017-04-26 Thread Varad Gautam
From: Varad Gautam these allow querying the driver for supported dmabuf formats and modifiers. v2: move to __DRIimageExtension version 16. v3: return GLBoolean for error reporting, document params better. Signed-off-by: Varad Gautam ---

[Mesa-dev] [PATCH v3] st/dri: support format queries

2017-04-26 Thread Varad Gautam
From: Varad Gautam ask the driver for supported dmabuf formats v2: rebase to master. v3: return false on failure. Signed-off-by: Varad Gautam --- src/gallium/state_trackers/dri/dri2.c | 15 +++ 1 file changed, 15

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2017-04-26 Thread Jean Hertel
>On 2017-04-26 06:23, Eric Engestrom wrote: > > >Perfect, thanks! >I left a couple comments on 0658cf3db95c77dbe590. > Ok, I will focus on fixing the issues pointed out. >> >> Foot Note: Some changes are still necessary because some specification files >> (patents.txt, libGL.txt, features.txt,

[Mesa-dev] [PATCH 3/3] i965/vec4: don't modify regioning parameters to the sources of DF align1 instructions

2017-04-26 Thread Samuel Iglesias Gonsálvez
The regioning parameters are now properly set by convert_to_hw_regs() and we don't need to fix them in the generator. Signed-off-by: Samuel Iglesias Gonsálvez Cc: "17.1" --- src/intel/compiler/brw_vec4_generator.cpp | 9 + 1 file

[Mesa-dev] [PATCH 2/3] i965/vec4: fix register width for DF VGRF and UNIFORM

2017-04-26 Thread Samuel Iglesias Gonsálvez
On gen7, the swizzles used in DF align16 instructions works for element size of 32 bits, so we can address only 2 consecutive DFs. As we assumed that in the rest of the code and prepare the instructions for this (scalarize_df()), we need to set it to two again. However, for DF align1

[Mesa-dev] [PATCH 1/3] i965/vec4: fix vertical stride to avoid breaking region parameter rule

2017-04-26 Thread Samuel Iglesias Gonsálvez
From IVB PRM, vol4, part3, "General Restrictions on Regioning Parameters": "If ExecSize = Width and HorzStride ≠ 0, VertStride must be set to Width * HorzStride." In next patch, we are going to modify the region parameter for uniforms and vgrf. For uniforms that are the source of DF align1

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2017-04-26 Thread Jean Hertel
>On 2017-04-26 at 08:13, Emil Velikov wrote: >Thanks again for doing this Jean. A handful of, mostly trivial, questions. > > - Is there a website where one can check the output of specific >Sphinx markdown. I have searched for such a thing too, but have not found :( >

[Mesa-dev] [PATCH] glsl: set vector_elements to 1 for samplers

2017-04-26 Thread Samuel Pitoiset
I don't see any reasons why vector_elements is 1 for images and 0 for samplers. This increases consistency and allows to clean up some code a bit. This will also help for ARB_bindless_texture. No piglit regressions with RadeonSI. Signed-off-by: Samuel Pitoiset ---

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2017-04-26 Thread Eric Engestrom
On Wednesday, 2017-04-26 12:13:17 +0100, Emil Velikov wrote: > Eric, > Not sure that squashing 200+ changes (resulting in a total of +37K > -41K change stat) in one big blob is a wise move. > Since those are going to be pushed at once, there should be > limited-to-no side effects to mesa3d.org.

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2017-04-26 Thread Emil Velikov
On 25 April 2017 at 19:56, Jean Hertel wrote: >>On 2017-04-24 12:40, Eric Engestrom wrote: >> >>Sorry I haven't had time to look at this until now. >> >>I just had a look, and besides style that can be tweaked later, I think >>the main issue is that the homepage a visitor

[Mesa-dev] [PATCH v2 2/2] i965/vec4: load dvec3/4 uniforms first in the push constant buffer

2017-04-26 Thread Samuel Iglesias Gonsálvez
Reorder the uniforms to load first the dvec4-aligned variables in the push constant buffer and then push the vec4-aligned ones. This fixes a bug were the dvec3/4 might be loaded one part on a GRF and the rest in next GRF, so the region parameters to read that could break the HW rules.

[Mesa-dev] [PATCH v2 1/2] i965/vec4: fix swizzle and writemask when loading an uniform with constant offset

2017-04-26 Thread Samuel Iglesias Gonsálvez
It was setting XYWZ swizzle and writemask to all uniforms, no matter if they were a vector or scalar, so this can lead to problems when loading them to the push constant buffer. Moreover, 'shift' calculation was designed to calculate the offset in DWORDS, but it doesn't take into account DFs, so

Re: [Mesa-dev] [PATCH v2 11/31] glsl: fix std140/std430 interfaces for bindless samplers/images

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 04:44 AM, Timothy Arceri wrote: Can we just update is_scalar instead? That should work but only if vector_elements is 1 for samplers. On 24/04/17 20:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Samplers are represented using 64-bit integer handles".

Re: [Mesa-dev] [PATCH v2 12/31] glsl: allow bindless images to be declared inside structures

2017-04-26 Thread Timothy Arceri
On 26/04/17 20:14, Timothy Arceri wrote: On 26/04/17 19:50, Timothy Arceri wrote: On 26/04/17 17:28, Nicolai Hähnle wrote: On 26.04.2017 04:45, Timothy Arceri wrote: Reviewed-by: Timothy Arceri On 24/04/17 20:35, Samuel Pitoiset wrote: The spec doesn't clearly

Re: [Mesa-dev] [PATCH v2 12/31] glsl: allow bindless images to be declared inside structures

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 12:14 PM, Timothy Arceri wrote: On 26/04/17 19:50, Timothy Arceri wrote: On 26/04/17 17:28, Nicolai Hähnle wrote: On 26.04.2017 04:45, Timothy Arceri wrote: Reviewed-by: Timothy Arceri On 24/04/17 20:35, Samuel Pitoiset wrote: The spec doesn't

Re: [Mesa-dev] [PATCH v2 12/31] glsl: allow bindless images to be declared inside structures

2017-04-26 Thread Timothy Arceri
On 26/04/17 19:50, Timothy Arceri wrote: On 26/04/17 17:28, Nicolai Hähnle wrote: On 26.04.2017 04:45, Timothy Arceri wrote: Reviewed-by: Timothy Arceri On 24/04/17 20:35, Samuel Pitoiset wrote: The spec doesn't clearly state this, but I have got clarifiation from

Re: [Mesa-dev] [RFC 1/1] glx: port dri2GetBuffers/dri2GetBuffersWithFormat to XCB

2017-04-26 Thread Gregory Hainaut
On 4/26/17, Michel Dänzer wrote: > On 26/04/17 05:07 PM, Gregory Hainaut wrote: >> >> Note: those dri2* functions are typically called by gallium/mesa state >> tracker to handle new backbuffer allocation. When the old backbuffer was >> previously invalidated due to vsync. > >

Re: [Mesa-dev] [PATCH v2 04/31] glsl: make component_slots() returns 2 for samplers/images

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 11:44 AM, Timothy Arceri wrote: On 26/04/17 17:47, Samuel Pitoiset wrote: On 04/26/2017 03:46 AM, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: Bindless samplers/images are 64-bit unsigned integers, which means they consume two components as specified by

Re: [Mesa-dev] [RFC 0/1] Port dri2GetBuffersWithFormat/dri2GetBuffers to XCB

2017-04-26 Thread Gregory Hainaut
On 4/26/17, Michel Dänzer wrote: > On 26/04/17 05:07 PM, Gregory Hainaut wrote: >> Following the discussion in "[PATCH v4 0/3] asynchronous pbo transfer with >> glthread" >> >> It will help apps that are ported to XCB. > > How so? I didn't test it (yet). But I think it is

Re: [Mesa-dev] [PATCH v2 12/31] glsl: allow bindless images to be declared inside structures

2017-04-26 Thread Timothy Arceri
On 26/04/17 17:28, Nicolai Hähnle wrote: On 26.04.2017 04:45, Timothy Arceri wrote: Reviewed-by: Timothy Arceri On 24/04/17 20:35, Samuel Pitoiset wrote: The spec doesn't clearly state this, but I have got clarifiation from the spec authors. Okay, that answers my

Re: [Mesa-dev] [PATCH v2 04/31] glsl: make component_slots() returns 2 for samplers/images

2017-04-26 Thread Timothy Arceri
On 26/04/17 17:47, Samuel Pitoiset wrote: On 04/26/2017 03:46 AM, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: Bindless samplers/images are 64-bit unsigned integers, which means they consume two components as specified by ARB_bindless_texture. It looks like we are not

[Mesa-dev] [PATCH 1/2] vbo: set min_index = 0 so gallium can use the value directly

2017-04-26 Thread Marek Olšák
From: Marek Olšák We could also remove index_bounds_valid and use max_index != ~0 instead. Opinions on that are welcome. --- src/mesa/vbo/vbo_context.c| 2 +- src/mesa/vbo/vbo_exec_array.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 2/2] st/mesa: use min_index and max_index directly from vbo

2017-04-26 Thread Marek Olšák
From: Marek Olšák also remove the incorrect comment about primitive restart. --- src/mesa/state_tracker/st_draw.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index

Re: [Mesa-dev] [RFC] - Rewrite mesa website in Sphinx

2017-04-26 Thread Eric Engestrom
On Tuesday, 2017-04-25 18:56:53 +, Jean Hertel wrote: > >On 2017-04-24 12:40, Eric Engestrom wrote: > > > >Sorry I haven't had time to look at this until now. > > > >I just had a look, and besides style that can be tweaked later, I think > >the main issue is that the homepage a visitor lands

Re: [Mesa-dev] [RFC 1/1] glx: port dri2GetBuffers/dri2GetBuffersWithFormat to XCB

2017-04-26 Thread Michel Dänzer
On 26/04/17 05:07 PM, Gregory Hainaut wrote: > > Note: those dri2* functions are typically called by gallium/mesa state > tracker to handle new backbuffer allocation. When the old backbuffer was > previously invalidated due to vsync. FWIW, DRI2 buffer invalidation isn't directly related to

Re: [Mesa-dev] [RFC 0/1] Port dri2GetBuffersWithFormat/dri2GetBuffers to XCB

2017-04-26 Thread Michel Dänzer
On 26/04/17 05:07 PM, Gregory Hainaut wrote: > Following the discussion in "[PATCH v4 0/3] asynchronous pbo transfer with > glthread" > > It will help apps that are ported to XCB. How so? > But Xlib (without XInitThread) apps will still crash when glthread is > enabled on DRI2. Do the

Re: [Mesa-dev] [PATCH 1/2] egl_dri2: Add support for Tizen

2017-04-26 Thread Mun, Gwan-gyeong
Hi Emil, Thanks for review my patch, 2017-04-26 0:58 GMT+09:00 Daniel Stone : > Hi, > > On 25 April 2017 at 17:03, Emil Velikov wrote: >> From a quick look most of this code is copy/pasted from platform_wayland.c. >> >> At the same time, large

Re: [Mesa-dev] [PATCH v2 30/31] glsl: disable tree grafting optimization for bindless images

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 10:05 AM, Nicolai Hähnle wrote: On 24.04.2017 12:36, Samuel Pitoiset wrote: Because the variable declaration holds more information than the dereference. Note that an image is considered bindless either if it has been declared in the default uniform block with the

Re: [Mesa-dev] [PATCH v2 27/31] glsl: implement ARB_bindless_texture conversions

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 10:02 AM, Nicolai Hähnle wrote: On 26.04.2017 06:45, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Modify Section 5.4.1, Conversion and Scalar Constructors, p. 60" (add the following constructors:) //

Re: [Mesa-dev] [PATCH v2 23/31] glsl: allow bindless samplers/images to be assigned

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 09:54 AM, Nicolai Hähnle wrote: On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture allows sampler and image types to be declared as temporary variables, to be converted from/to uvec2 using explicit constructors, so they can be assigned. Signed-off-by: Samuel

Re: [Mesa-dev] [PATCH 1/2] radeonsi/ac: move vertex export remove to common code.

2017-04-26 Thread Nicolai Hähnle
On 26.04.2017 01:12, Dave Airlie wrote: From: Dave Airlie This code can be shared by radv, we bump the max to VARYING_SLOT_MAX here, but that shouldn't have too much fallout. Signed-off-by: Dave Airlie Reviewed-by: Nicolai Hähnle

Re: [Mesa-dev] [PATCH v5 0/3] asynchronous pbo transfer with glthread

2017-04-26 Thread gregory hainaut
On Wed, 26 Apr 2017 11:03:11 +0900 Michel Dänzer wrote: > On 25/04/17 06:14 PM, Gregory Hainaut wrote: > > Hello, > > > > I did more tests on my side. DRI3 + recent stack is fine. Older > > (Debian Jessie, ~2y old) XCB hangs/deadlock. So all DRI3 drivers > > should be fine

Re: [Mesa-dev] [PATCH 2/2] glsl: remove duplicate validation

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 10:07 AM, Timothy Arceri wrote: On 26/04/17 17:40, Samuel Pitoiset wrote: Nope, I'm pretty sure this allows to declare "out bool foo" in a fragment shader because is_varying_var() only returns TRUE for inputs. The code below what this patch removes validates frag outputs.

Re: [Mesa-dev] [PATCH] radeonsi: use unsynchronized transfers for shader binary uploads

2017-04-26 Thread Nicolai Hähnle
On 26.04.2017 00:36, Samuel Pitoiset wrote: Because the buffer is new, it can't be referenced by any CS. This can save few CPU cycles by skipping the whole PIPE_TRANSFER_UNSYNCHRONIZED if in amdgpu_bo_map(). Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai

Re: [Mesa-dev] [PATCH mesa] configure: print LDFLAGS alongside CFLAGS & co.

2017-04-26 Thread Nicolai Hähnle
On 25.04.2017 22:15, Eric Engestrom wrote: Signed-off-by: Eric Engestrom Makes sense. Reviewed-by: Nicolai Hähnle --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index

[Mesa-dev] [RFC 1/1] glx: port dri2GetBuffers/dri2GetBuffersWithFormat to XCB

2017-04-26 Thread Gregory Hainaut
By default Xlib isn't thread safe so we better avoid it when gl thread is enabled. It will help applications that use XCB. But it will still crash if applications are still relying on Xlib (without XInitThread). Note: those dri2* functions are typically called by gallium/mesa state tracker to

[Mesa-dev] [RFC 0/1] Port dri2GetBuffersWithFormat/dri2GetBuffers to XCB

2017-04-26 Thread Gregory Hainaut
Following the discussion in "[PATCH v4 0/3] asynchronous pbo transfer with glthread" It will help apps that are ported to XCB. But Xlib (without XInitThread) apps will still crash when glthread is enabled on DRI2. I only tested the patch on Nouveau There are 3 remaining possibilities * Won't

Re: [Mesa-dev] [PATCH 2/2] glsl: remove duplicate validation

2017-04-26 Thread Timothy Arceri
On 26/04/17 17:40, Samuel Pitoiset wrote: Nope, I'm pretty sure this allows to declare "out bool foo" in a fragment shader because is_varying_var() only returns TRUE for inputs. The code below what this patch removes validates frag outputs. That should catch your example. On 04/26/2017

Re: [Mesa-dev] [PATCH v2 17/31] glsl: reject bindless samplers/images frag inputs without 'flat'

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 09:37 AM, Nicolai Hähnle wrote: On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Modify Section 4.3.4, Inputs, p. 34" "(modify last paragraph, p. 35, allowing samplers and images as fragment shader inputs) ... Fragment inputs can only

Re: [Mesa-dev] [PATCH v2 30/31] glsl: disable tree grafting optimization for bindless images

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:36, Samuel Pitoiset wrote: Because the variable declaration holds more information than the dereference. Note that an image is considered bindless either if it has been declared in the default uniform block with the bindless_sampler layout qualifier, or when its storage is not

Re: [Mesa-dev] [PATCH v2 29/31] glsl: do not count bindless samplers/images when linking uniforms

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:36, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Modify Section 2.14.8, Shader Execution, p. 122" "(modify second paragraph, p. 126) ... against the MAX_COMBINED_TEXTURE_IMAGE_UNITS limit. Samplers accessed using texture handles (section

Re: [Mesa-dev] [PATCH v2 13/31] glsl: allow image qualifiers inside structures

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 09:30 AM, Nicolai Hähnle wrote: On 24.04.2017 12:35, Samuel Pitoiset wrote: The GL_ARB_bindless_texture allows to declare images inside structures which means that qualifiers like writeonly should be allowed. I have a got a confirmation from Jeff Bolz (one author of the spec),

Re: [Mesa-dev] [PATCH v2 28/31] glsl: lower bindless sampler/image packed varyings

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/lower_packed_varyings.cpp | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/lower_packed_varyings.cpp

Re: [Mesa-dev] [PATCH v2 27/31] glsl: implement ARB_bindless_texture conversions

2017-04-26 Thread Nicolai Hähnle
On 26.04.2017 06:45, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Modify Section 5.4.1, Conversion and Scalar Constructors, p. 60" (add the following constructors:) // In the following four constructors, the low 32

Re: [Mesa-dev] [PATCH v2 12/31] glsl: allow bindless images to be declared inside structures

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 09:28 AM, Nicolai Hähnle wrote: On 26.04.2017 04:45, Timothy Arceri wrote: Reviewed-by: Timothy Arceri On 24/04/17 20:35, Samuel Pitoiset wrote: The spec doesn't clearly state this, but I have got clarifiation from the spec authors. Okay, that answers

Re: [Mesa-dev] [PATCH v2 26/31] glsl: allow bindless samplers/images to be used with constructors

2017-04-26 Thread Nicolai Hähnle
With Timothy's suggestion, patches 24-26: Reviewed-by: Nicolai Hähnle On 24.04.2017 12:35, Samuel Pitoiset wrote: For the explicit conversions. Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/ast_function.cpp | 3 ++- 1 file changed,

Re: [Mesa-dev] [PATCH v2 22/31] glsl: allow bindless samplers/images to be initialized

2017-04-26 Thread Nicolai Hähnle
With Timothy's suggestion: Reviewed-by: Nicolai Hähnle On 24.04.2017 12:35, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/ast_to_hir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH v2 23/31] glsl: allow bindless samplers/images to be assigned

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture allows sampler and image types to be declared as temporary variables, to be converted from/to uvec2 using explicit constructors, so they can be assigned. Signed-off-by: Samuel Pitoiset ---

Re: [Mesa-dev] [PATCH v2 07/31] glsl: allow bindless samplers/images as shader outputs

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 06:00 AM, Timothy Arceri wrote: On 26/04/17 12:21, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/ast_to_hir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [Mesa-dev] [PATCH v2 04/31] glsl: make component_slots() returns 2 for samplers/images

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 09:10 AM, Nicolai Hähnle wrote: On 24.04.2017 12:35, Samuel Pitoiset wrote: Bindless samplers/images are 64-bit unsigned integers, which means they consume two components as specified by ARB_bindless_texture. It looks like we are not wasting uniform storage by changing this

Re: [Mesa-dev] [PATCH v2 21/31] glsl: allow bindless samplers/images to be l-values

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Replace Section 4.1.7 (Samplers), p. 25" "Samplers can be used as l-values, so can be assigned into and used as "out" and "inout" function parameters." "Replace Section 4.1.X, (Images)" "Images

Re: [Mesa-dev] [PATCH v2 04/31] glsl: make component_slots() returns 2 for samplers/images

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 03:46 AM, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: Bindless samplers/images are 64-bit unsigned integers, which means they consume two components as specified by ARB_bindless_texture. It looks like we are not wasting uniform storage by changing this

Re: [Mesa-dev] [PATCH v2 20/31] glsl: add _mesa_glsl_parse_state object to is_lvalue()

2017-04-26 Thread Nicolai Hähnle
On 26.04.2017 06:25, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: Yes, this is a bit hacky but we don't really have the choice. Plain GLSL doesn't accept bindless samplers/images as l-values while it's allowed when ARB_bindless_texture is enabled. Are you sure we need this?

Re: [Mesa-dev] [PATCH v2 03/31] glsl: make sampler/image types as 64-bit

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 03:36 AM, Timothy Arceri wrote: On 24/04/17 20:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Samplers are represented using 64-bit integer handles." and, "Images are represented using 64-bit integer handles." It seems simpler to always consider

Re: [Mesa-dev] [PATCH v2 18/31] glsl: relax bindless sampler arrays indexing

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Replace Section 4.1.7 (Samplers), p. 25" "Samplers aggregated into arrays within a shader (using square brackets []) can be indexed with arbitrary integer expressions." Signed-off-by: Samuel Pitoiset

Re: [Mesa-dev] [PATCH v2 19/31] glsl: fix explicit binding location for bindless samplers/images

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Interactions with GLSL 4.20" "Without GLSL 4.20 support, sampler and image uniforms may only be initialized through the OpenGL API. With GLSL 4.20, sampler and image uniforms may be initialized in

Re: [Mesa-dev] [PATCH 2/2] glsl: remove duplicate validation

2017-04-26 Thread Samuel Pitoiset
Nope, I'm pretty sure this allows to declare "out bool foo" in a fragment shader because is_varying_var() only returns TRUE for inputs. On 04/26/2017 05:56 AM, Timothy Arceri wrote: Varying types have already been validated in apply_type_qualifier_to_variable() by this point. ---

Re: [Mesa-dev] [PATCH v2 17/31] glsl: reject bindless samplers/images frag inputs without 'flat'

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Modify Section 4.3.4, Inputs, p. 34" "(modify last paragraph, p. 35, allowing samplers and images as fragment shader inputs) ... Fragment inputs can only be signed and unsigned integers and integer

Re: [Mesa-dev] [PATCH v2 16/31] glsl: allow bindless samplers/images as vertex shader inputs

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Modify Section 4.3.4, Inputs, p. 34" "(modify third paragraph of the section to allow sampler and image types) ... Vertex shader inputs can only be float, single-precision floating-point scalars,

Re: [Mesa-dev] [PATCH v2 13/31] glsl: allow image qualifiers inside structures

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The GL_ARB_bindless_texture allows to declare images inside structures which means that qualifiers like writeonly should be allowed. I have a got a confirmation from Jeff Bolz (one author of the spec), because the spec doesn't clearly explain this.

Re: [Mesa-dev] [PATCH 1/2] glsl: use without_array() rather than get_scalar_type()

2017-04-26 Thread Samuel Pitoiset
On 04/26/2017 05:56 AM, Timothy Arceri wrote: Here get_scalar_type() was just geing use to remove the array after that we converted it back to bast_type anyway so just use the without_array() helper. Type: geing -> being I think we can just get rid of get_scalar_type() everywhere because

Re: [Mesa-dev] [PATCH v2 12/31] glsl: allow bindless images to be declared inside structures

2017-04-26 Thread Nicolai Hähnle
On 26.04.2017 04:45, Timothy Arceri wrote: Reviewed-by: Timothy Arceri On 24/04/17 20:35, Samuel Pitoiset wrote: The spec doesn't clearly state this, but I have got clarifiation from the spec authors. Okay, that answers my question from the other email. BTW, what

Re: [Mesa-dev] [PATCH v2 10/31] glsl: allow bindless samplers/images inside interface blocks

2017-04-26 Thread Nicolai Hähnle
With Timothy's comments addressed, patch 9 & 10: Reviewed-by: Nicolai Hähnle On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Modify Section 4.3.7, Interface Blocks, p. 38" "(remove the following bullet from the last list on p.

Re: [Mesa-dev] [PATCH v2 11/31] glsl: fix std140/std430 interfaces for bindless samplers/images

2017-04-26 Thread Nicolai Hähnle
On 26.04.2017 04:44, Timothy Arceri wrote: Can we just update is_scalar instead? It's probably worth a try. Cheers, Nicolai On 24/04/17 20:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Samplers are represented using 64-bit integer handles". Signed-off-by: Samuel

Re: [Mesa-dev] [PATCH v2 08/31] glsl: allow bindless samplers/images as out and inout parameters

2017-04-26 Thread Nicolai Hähnle
Reviewed-by: Nicolai Hähnle On 24.04.2017 12:35, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/ast_to_hir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH v2 06/31] glsl: allow to declare bindless samplers/images as non-uniform

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: The ARB_bindless_texture spec says: "Replace Section 4.1.7 (Samplers), p. 25" "Samplers may be declared as shader inputs and outputs, as uniform variables, as temporary variables, and as function parameters." "Replace Section 4.1.X,

Re: [Mesa-dev] [PATCH v2 05/31] glsl: process bindless/bound layout qualifiers

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: This adds bindless_sampler and bound_sampler (and respectively bindless_image and bound_image) to the parser. Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/ast.h | 8

Re: [Mesa-dev] [PATCH] anv: Don't place scratch buffers above the 32-bit boundary

2017-04-26 Thread Jason Ekstrand
Ken? On Sat, Apr 22, 2017 at 6:09 PM, Grazvydas Ignotas wrote: > Fixes: 651ec926fc1 "anv: Add support for 48-bit addresses" > Tested-by: Grazvydas Ignotas > > On Sun, Apr 23, 2017 at 1:55 AM, Jason Ekstrand > wrote: > >> This fixes

Re: [Mesa-dev] [PATCH v2 04/31] glsl: make component_slots() returns 2 for samplers/images

2017-04-26 Thread Nicolai Hähnle
On 24.04.2017 12:35, Samuel Pitoiset wrote: Bindless samplers/images are 64-bit unsigned integers, which means they consume two components as specified by ARB_bindless_texture. It looks like we are not wasting uniform storage by changing this because default-block uniforms are not packed. So,

[Mesa-dev] [PATCH] anv/query: handle more cases of 'out of host memory'

2017-04-26 Thread Iago Toral Quiroga
--- src/intel/vulkan/genX_query.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c index 126431b..22de3c3 100644 --- a/src/intel/vulkan/genX_query.c +++ b/src/intel/vulkan/genX_query.c @@ -566,6 +566,11 @@

Re: [Mesa-dev] [PATCH 1/2] glsl: use without_array() rather than get_scalar_type()

2017-04-26 Thread Alejandro Piñeiro
On 26/04/17 05:56, Timothy Arceri wrote: > Here get_scalar_type() was just geing use to remove the array > after that we converted it back to bast_type anyway so just Typo: base_type (instead of bast_type) > use the without_array() helper. Makes sense, assuming no test regression: Reviewed-by:

<    1   2   3   >