[Mesa-dev] [PATCH] anv: avoid null pointer dereference

2017-05-02 Thread Lionel Landwerlin
The application might not give an output structure. CID: 1405765 (Null pointer dereferences) Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_formats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_formats.c

[Mesa-dev] [PATCH V3] glapi: add KHR_no_error support to dispatch table generation

2017-05-02 Thread Timothy Arceri
This will allows us to create no error versions of functions noted by a _no_error suffix. We also need to set a no_error attribute equal to "true" in the xml. V3: stop the no_error attribute being overwritten when functions alias another. V2: tidy up suggested by Nicolai. ---

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

2017-05-02 Thread Constantine Kharlamov
On 03.05.2017 00:50, Constantine Kharlamov wrote: > On 28.04.2017 10:57, Marc Dietrich wrote: >> Hi Constantine, >> >> >> Am Donnerstag, 27. April 2017, 21:04:37 CEST schrieb Constantine Kharlamov: >>> Please, could you try this patch. The change is: I'm setting dirty_zsbuf in >>>

[Mesa-dev] [PATCH 1/2] mesa: tidy up accum.h

2017-05-02 Thread Timothy Arceri
These were unused. --- src/mesa/main/accum.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/main/accum.h b/src/mesa/main/accum.h index a5665c7..ede2ecc 100644 --- a/src/mesa/main/accum.h +++ b/src/mesa/main/accum.h @@ -32,23 +32,21 @@ * OTHER DEALINGS IN THE SOFTWARE. */

[Mesa-dev] [PATCH 2/2] mesa: make _mesa_accum() static

2017-05-02 Thread Timothy Arceri
--- src/mesa/main/accum.c | 104 +- src/mesa/main/accum.h | 3 -- 2 files changed, 52 insertions(+), 55 deletions(-) diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index ef74468..919c441 100644 --- a/src/mesa/main/accum.c +++

[Mesa-dev] [PATCH] nir/lower_tex: Fix minor error in YUV color conversion matrix

2017-05-02 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in: https://en.wikipedia.org/wiki/YCbCr There was an error in converting the offsets from integers to unorm values: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. With this fix, the CSC result is bit aligned with wikipedia's

Re: [Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-05-02 Thread Lin, Johnson
Thanks for the comments and have updated the patch! -Original Message- From: Matt Turner [mailto:matts...@gmail.com] Sent: Wednesday, May 3, 2017 2:37 AM To: Lin, Johnson Cc: mesa-dev@lists.freedesktop.org Subject: Re: [Mesa-dev] [PATCH] fix minor error in YUV2RGB

Re: [Mesa-dev] [PATCH] radv/ac: canonicalize the output for 32-bit float min/max.

2017-05-02 Thread Dave Airlie
On 17 March 2017 at 18:24, Bas Nieuwenhuizen wrote: > Where do you see that they are required to flush denormals to 0? I > can't find it in the GLSL extensions for SPIR-V, and the vulkan spec > has the following note: > > "Any denormalized value input into a shader or

[Mesa-dev] [PATCH] st/glsl_to_tgsi: remove unrequired tgsi_get_opcode_info() call

2017-05-02 Thread Timothy Arceri
This is already set for the instruction at initialisation. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index ce4a2cb..1e606d5 100644 ---

Re: [Mesa-dev] [PATCH 1/2] glapi: add KHR_no_error support to dispatch table generation

2017-05-02 Thread Timothy Arceri
On 02/05/17 20:43, Nicolai Hähnle wrote: On 27.04.2017 07:33, Timothy Arceri wrote: This will allows us to create no error versions of functions noted by a _no_error suffix. We also need to set a no_error attribute equal to "true" in the xml. --- src/mapi/glapi/gen/gl_XML.py | 5 +

[Mesa-dev] [PATCH v2] glapi: add KHR_no_error support to dispatch table generation

2017-05-02 Thread Timothy Arceri
This will allows us to create no error versions of functions noted by a _no_error suffix. We also need to set a no_error attribute equal to "true" in the xml. V2: tidy up suggested by Nicolai --- src/mapi/glapi/gen/gl_XML.py | 5 + src/mapi/glapi/gen/gl_genexec.py | 12 ++-- 2

[Mesa-dev] [PATCH] radv: Add userspace fence buffer per context.

2017-05-02 Thread Bas Nieuwenhuizen
Having it in the winsys didn't work when multiple devices use the same winsys, as we then have multiple contexts per queue, and each context counts separately. Signed-off-by: Bas Nieuwenhuizen Fixes: 7b9963a28f4 "radv: Enable userspace fence checking." ---

Re: [Mesa-dev] [PATCH 09/22] anv/cmd_buffer: Don't partially fast-clear image layers

2017-05-02 Thread Jason Ekstrand
On Tue, May 2, 2017 at 4:37 PM, Nanley Chery wrote: > On Tue, May 02, 2017 at 04:25:42PM -0700, Jason Ekstrand wrote: > > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery > > wrote: > > > > > Signed-off-by: Nanley Chery > >

Re: [Mesa-dev] [PATCH 18/21] anv: Implement support for exporting semaphores as FENCE_FD

2017-05-02 Thread Chad Versace
I'm stopping here for today and will resume tomorrow. On Fri 14 Apr 2017, Jason Ekstrand wrote: > --- > src/intel/vulkan/anv_batch_chain.c | 96 > -- > src/intel/vulkan/anv_device.c | 25 ++ > src/intel/vulkan/anv_gem.c | 36

Re: [Mesa-dev] [PATCH 17/21] anv/gem: Use EXECBUFFER2_WR when the FENCE_OUT flag is set

2017-05-02 Thread Chad Versace
On Fri 14 Apr 2017, Jason Ekstrand wrote: > --- > src/intel/vulkan/anv_gem.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c > index 185086f..1392bf4 100644 > --- a/src/intel/vulkan/anv_gem.c > +++

Re: [Mesa-dev] [PATCH 15/22] anv/cmd_buffer: Adjust the image view reloc function

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Make the function take in an image instead of an image view. This > enables us to record relocations for surfaces states created outside of > the anv_CreateImageView path. > > Signed-off-by: Nanley Chery

Re: [Mesa-dev] [PATCH 15/21] anv: Pull the guts of cmd_buffer_execbuf into a helper

2017-05-02 Thread Chad Versace
Patches 10-15 are Reviewed-by: Chad Versace ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 16/21] anv: Implement VK_KHX_external_semaphore_fd

2017-05-02 Thread Chad Versace
On Fri 14 Apr 2017, Jason Ekstrand wrote: > This implementation allocates a 4k BO for each semaphore that can be > exported using OPAQUE_FD and uses the kernel's already-existing > synchronization mechanism on BOs. > --- > src/intel/vulkan/anv_batch_chain.c | 53 ++-- >

Re: [Mesa-dev] [PATCH 14/22] anv/blorp: Add a surface-state-based CCS resolve function

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > This will be used in conjunction with the buffer of clear values. > > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/anv_blorp.c | 41 ++ > +++ >

Re: [Mesa-dev] [PATCH 13/22] blorp/clear: Add a binding-table-based CCS resolve function

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/blorp/blorp.h | 9 ++ > src/intel/blorp/blorp_clear.c | 64 ++ > ++--- > 2 files changed, 57

Re: [Mesa-dev] [PATCH 12/22] anv/gpu_memcpy: Add a lighter-weight memcpy path

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > We're now performing a GPU memcpy in more places to copy small amounts > of data. Add a path to thrash less state. > > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/genX_gpu_memcpy.c

Re: [Mesa-dev] [PATCH 11/22] anv/cmd_buffer: Ensure the fast clear values are correct

2017-05-02 Thread Nanley Chery
On Tue, May 02, 2017 at 04:54:55PM -0700, Jason Ekstrand wrote: > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery > wrote: > > > Signed-off-by: Nanley Chery > > --- > > src/intel/vulkan/genX_cmd_buffer.c | 76 ++ > >

Re: [Mesa-dev] [PATCH 11/22] anv/cmd_buffer: Ensure the fast clear values are correct

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/genX_cmd_buffer.c | 76 ++ > > 1 file changed, 76 insertions(+) > > diff --git

Re: [Mesa-dev] [PATCH 10/22] anv/cmd_buffer: Disable fast clears in the GENERAL layout

2017-05-02 Thread Nanley Chery
On Tue, May 02, 2017 at 04:44:49PM -0700, Jason Ekstrand wrote: > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery > wrote: > > > Signed-off-by: Nanley Chery > > --- > > src/intel/vulkan/anv_pass.c| 22 ++ > >

Re: [Mesa-dev] [PATCH 10/22] anv/cmd_buffer: Disable fast clears in the GENERAL layout

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/anv_pass.c| 22 ++ > src/intel/vulkan/anv_private.h | 1 + > src/intel/vulkan/genX_cmd_buffer.c | 20

Re: [Mesa-dev] [PATCH 2/5] glsl: Ban #undefining __LINE__ and friends on GLES2.

2017-05-02 Thread Erik Faye-Lund
On Wed, May 3, 2017 at 1:23 AM, Eric Anholt wrote: > Erik Faye-Lund writes: > >> On Tue, May 2, 2017 at 7:36 PM, Eric Anholt wrote: >>> Fixes deqp_gles2 undefine_invalid_object_* failures. >>> --- >>> src/compiler/glsl/glcpp/glcpp-parse.y

Re: [Mesa-dev] [PATCH 08/22] anv/cmd_buffer: Always enable CCS_D in render passes

2017-05-02 Thread Jason Ekstrand
On Tue, May 2, 2017 at 4:28 PM, Nanley Chery wrote: > On Tue, May 02, 2017 at 04:15:42PM -0700, Jason Ekstrand wrote: > > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery > > wrote: > > > > > The lifespan of the fast-clear data will surpass the render

Re: [Mesa-dev] [PATCH 09/22] anv/cmd_buffer: Don't partially fast-clear image layers

2017-05-02 Thread Nanley Chery
On Tue, May 02, 2017 at 04:25:42PM -0700, Jason Ekstrand wrote: > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery > wrote: > > > Signed-off-by: Nanley Chery > > --- > > src/intel/vulkan/genX_cmd_buffer.c | 18 +++--- > > 1 file

Re: [Mesa-dev] [PATCH 08/22] anv/cmd_buffer: Always enable CCS_D in render passes

2017-05-02 Thread Nanley Chery
On Tue, May 02, 2017 at 04:15:42PM -0700, Jason Ekstrand wrote: > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery > wrote: > > > The lifespan of the fast-clear data will surpass the render pass scope. > > We need CCS_D to be enabled in order to invalidate blocks previously

Re: [Mesa-dev] [PATCH 09/22] anv/cmd_buffer: Don't partially fast-clear image layers

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/genX_cmd_buffer.c | 18 +++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git

Re: [Mesa-dev] [PATCH 2/5] glsl: Ban #undefining __LINE__ and friends on GLES2.

2017-05-02 Thread Eric Anholt
Erik Faye-Lund writes: > On Tue, May 2, 2017 at 7:36 PM, Eric Anholt wrote: >> Fixes deqp_gles2 undefine_invalid_object_* failures. >> --- >> src/compiler/glsl/glcpp/glcpp-parse.y | 7 ++- >> 1 file changed, 2 insertions(+), 5 deletions(-) >> >> diff

Re: [Mesa-dev] [PATCH 08/22] anv/cmd_buffer: Always enable CCS_D in render passes

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > The lifespan of the fast-clear data will surpass the render pass scope. > We need CCS_D to be enabled in order to invalidate blocks previously > marked as cleared and to sample cleared data correctly. > >

Re: [Mesa-dev] [PATCH 2/5] glsl: Ban #undefining __LINE__ and friends on GLES2.

2017-05-02 Thread Erik Faye-Lund
On Tue, May 2, 2017 at 7:36 PM, Eric Anholt wrote: > Fixes deqp_gles2 undefine_invalid_object_* failures. > --- > src/compiler/glsl/glcpp/glcpp-parse.y | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y >

Re: [Mesa-dev] [PATCH 07/22] anv/image: Initialize the clear values buffer

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/anv_image.c | 75 ++ > +--- > src/intel/vulkan/anv_private.h | 5 +++ > 2 files changed, 69

[Mesa-dev] [PATCH] radv: enable lower_sub to fix loop unrolling.

2017-05-02 Thread Dave Airlie
From: Dave Airlie Loop unroll asserts if it hits a sub, we don't really want to lower subs as llvm handles these things, but do this for now, until we can fix loop unroll to work with subs. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_pipeline.c |

Re: [Mesa-dev] [PATCH 18/22] anv/cmd_buffer: Perform color buffer layout transitions

2017-05-02 Thread Nanley Chery
On Thu, Apr 27, 2017 at 11:32:17AM -0700, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/genX_cmd_buffer.c | 65 > ++ > 1 file changed, 52 insertions(+), 13 deletions(-) > > diff --git

Re: [Mesa-dev] [PATCH 06/22] anv/image: Remove incorrect assertion in anv_BindImage

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > According to the Linux kernel sources, the ioctl in anv_gem_mmap() will > not fail if the size isn't a multiple of 4KB. > I skimmed through the mmap code and I believe you are correct Reviewed-by: Jason Ekstrand

[Mesa-dev] [PATCH] radeonsi: constify a bunch of the perfcounter structs.

2017-05-02 Thread Dave Airlie
From: Dave Airlie This moves the structs from the data segment to the rodata segment, which seems like the more correct place for them. Signed-off-by: Dave Airlie --- src/gallium/drivers/radeon/r600_perfcounter.c | 2 +-

Re: [Mesa-dev] [PATCH 3/5] glsl: Restrict func redeclarations (not just redefinitions) on GLSL 1.00.

2017-05-02 Thread Matt Turner
On Tue, May 2, 2017 at 10:36 AM, Eric Anholt wrote: > Fixes DEQP's scoping.invalid.redeclare_function_fragment/vertex. > --- > src/compiler/glsl/ast_to_hir.cpp | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/src/compiler/glsl/ast_to_hir.cpp >

Re: [Mesa-dev] [PATCH 05/22] anv/image: Append CCS/MCS with a clear value buffer

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/anv_image.c | 67 ++ > ++ > 1 file changed, 67 insertions(+) > > diff --git

Re: [Mesa-dev] [PATCH 0/4] Call for testing: Gallium set_index_buffer removal etc.

2017-05-02 Thread Marek Olšák
On Wed, May 3, 2017 at 12:18 AM, Cherniak, Bruce wrote: > > On May 2, 2017, at 4:11 PM, Cherniak, Bruce > wrote: > > > On May 2, 2017, at 3:41 PM, Cherniak, Bruce > wrote: > > PART 2: Call for testing > > These

[Mesa-dev] [PATCH 1/1] radeonsi: Use libdrm to get chipset name

2017-05-02 Thread Li, Samuel
>From f097509a17a6ddf6a0f40fb1b73f289227a9539a Mon Sep 17 00:00:00 2001 From: Samuel Li Date: Thu, 27 Apr 2017 13:45:24 -0400 Subject: [PATCH 1/1] radeonsi: Use libdrm to get chipset name Change-Id: I614ea71424f9e5c97e4ae68654315d28c89eaa5f Signed-off-by: Samuel Li

Re: [Mesa-dev] [PATCH 0/4] Call for testing: Gallium set_index_buffer removal etc.

2017-05-02 Thread Cherniak, Bruce
On May 2, 2017, at 4:11 PM, Cherniak, Bruce > wrote: On May 2, 2017, at 3:41 PM, Cherniak, Bruce > wrote: PART 2: Call for testing These drivers have been tested: - ddebug -

[Mesa-dev] [PATCH] radv/meta: fix restoring a push descriptor set

2017-05-02 Thread Fredrik Höglund
radv_bind_descriptor_set cannot be used to bind a push descriptor set since a push descriptor set does not have a buffer list. However, there is no need to add the buffers again when restoring a set, so this fix is also an optimization. Cc: "17.1"

Re: [Mesa-dev] [PATCH 08/11] intel/decoder: Fix indentation

2017-05-02 Thread Rafael Antognolli
Reviewed-by: Rafael Antognolli On Mon, May 01, 2017 at 01:54:52PM -0700, Matt Turner wrote: > --- > src/intel/common/gen_decoder.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/intel/common/gen_decoder.c

Re: [Mesa-dev] [PATCH 05/11] genxml: Remove brackets from kernel start pointer names

2017-05-02 Thread Rafael Antognolli
Patch is Reviewed-by: Rafael Antognolli On Mon, May 01, 2017 at 01:54:49PM -0700, Matt Turner wrote: > Newer Gens' names don't have the brackets. Having common names will make > some later patches simpler. > --- > src/intel/genxml/gen4.xml | 2 +- >

Re: [Mesa-dev] [PATCH 04/22] anv: Add color auxiliary buffer helpers

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/vulkan/anv_private.h | 42 ++ > > 1 file changed, 42 insertions(+) > > diff --git

Re: [Mesa-dev] [PATCH 02/22] intel/isl: Only create a CCS buffer if the image supports rendering

2017-05-02 Thread Jason Ekstrand
This isn't entirely precise because you could create an E5B9G9R9 image and then only render to it using a R8G8B8A8_UNORM view and fast-clear with it. That said, neither API lets you do that and it's kind-of pointless for just one format. Reviewed-by: Jason Ekstrand On Thu,

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

2017-05-02 Thread Constantine Kharlamov
On 28.04.2017 10:57, Marc Dietrich wrote: > Hi Constantine, > > > Am Donnerstag, 27. April 2017, 21:04:37 CEST schrieb Constantine Kharlamov: >> Please, could you try this patch. The change is: I'm setting dirty_zsbuf in >> r600_bind_blend_state_internal() as well. It was the difference between

Re: [Mesa-dev] [PATCH 01/22] intel/isl: Limit CCS to one subresource on gen7

2017-05-02 Thread Jason Ekstrand
On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery wrote: > Signed-off-by: Nanley Chery > --- > src/intel/isl/isl.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > index

[Mesa-dev] [PATCH] radv: Don't set dynamic state for pipelines with rasterizer dicard.

2017-05-02 Thread Bas Nieuwenhuizen
All of the dynamic states apply to rasterization & fragment processing, so we don't need to set them if we don't rasterize. We don't clear the dirty flags for them though, so we don't miss any updates for the next pipeline with rasterization. Signed-off-by: Bas Nieuwenhuizen

[Mesa-dev] [PATCH] radv: flush more stages when semaphore are waiting.

2017-05-02 Thread Dave Airlie
From: Dave Airlie This still doesn't give us complete pWaitDstStageMask support, but it should provide enough to be correct if not as efficent as possible. If we have wait semaphores we must flush between submits and flush the shaders as well. This fixes the remaining fails

Re: [Mesa-dev] [PATCH 0/4] Call for testing: Gallium set_index_buffer removal etc.

2017-05-02 Thread Cherniak, Bruce
> On May 2, 2017, at 3:41 PM, Cherniak, Bruce wrote: > >> PART 2: Call for testing >> >> These drivers have been tested: >> - ddebug >> - llvmpipe >> - r300 (also with SWTCL) >> - r600 >> - radeonsi >> - softpipe >> - trace >> >> These drivers need testing: >> -

Re: [Mesa-dev] [PATCH 0/5] misc dEQP fixes for vc4

2017-05-02 Thread Matt Turner
On Tue, May 2, 2017 at 10:36 AM, Eric Anholt wrote: > Here's a little set of changes for dEQP fixes for GLES2 contexts. I > haven't done a full run to confirm no regressions, as full runs on > hardware take a day or so. I'm hoping the Intel CI system might be > able to test

[Mesa-dev] [PATCH v3 32/32] glsl: skip tree grafting for sampler and image types

2017-05-02 Thread Samuel Pitoiset
From: Nicolai Hähnle v2: - use is_sampler()/is_image() instead (Samuel Pitoiset) Reviewed-by: Samuel Pitoiset --- src/compiler/glsl/opt_tree_grafting.cpp | 11 +++ 1 file changed, 11 insertions(+) diff --git

[Mesa-dev] [PATCH v3 29/32] glsl: do not count bindless samplers/images when linking uniforms

2017-05-02 Thread Samuel Pitoiset
From section 2.14.8 of the ARB_bindless_texture spec: "(modify second paragraph, p. 126) ... against the MAX_COMBINED_TEXTURE_IMAGE_UNITS limit. Samplers accessed using texture handles (section 3.9.X) are not counted against this limit." Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH v3 20/32] glsl: add _mesa_glsl_parse_state object to is_lvalue()

2017-05-02 Thread Samuel Pitoiset
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. The default NULL parameter is because we can't access the _mesa_glsl_parse_state object in few places in the

[Mesa-dev] [PATCH v3 30/32] glsl: link bindless layout qualifiers

2017-05-02 Thread Samuel Pitoiset
From section 4.4.6 of the ARB_bindless_texture spec: "If both bindless_sampler and bound_sampler, or bindless_image and bound_image, are declared at global scope in any compilation unit, a link- time error will be generated." Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH v3 22/32] glsl: allow bindless samplers/images to be l-values

2017-05-02 Thread Samuel Pitoiset
From section 4.1.7 of the ARB_bindless_texture spec: "Samplers can be used as l-values, so can be assigned into and used as "out" and "inout" function parameters." From section 4.1.X of the ARB_bindless_texture spec: "Images can be used as l-values, so can be assigned into and used

[Mesa-dev] [PATCH v3 24/32] glsl: add ARB_bindless_texture operations

2017-05-02 Thread Samuel Pitoiset
For the explicit pack/unpack conversions. Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle --- src/compiler/glsl/ir_expression_operation.py | 6 ++

[Mesa-dev] [PATCH v3 28/32] glsl: lower bindless sampler/image packed varyings

2017-05-02 Thread Samuel Pitoiset
v3: - rebase (and remove (sampler) ? 1 : vector_elements) Signed-off-by: Samuel Pitoiset --- src/compiler/glsl/lower_packed_varyings.cpp | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/compiler/glsl/lower_packed_varyings.cpp

[Mesa-dev] [PATCH v3 21/32] glsl: skip IR validation for out/inout sampler/image parameters

2017-05-02 Thread Samuel Pitoiset
Plain GLSL doesn't allow sampler/image types to be l-values while ARB_bindless_texture allows the opposite. Unfortunately, at this point we can't have access to _mesa_glsl_parse_state. This is not ideal, but in order to avoid a crash in debug build, just skip the IR validation when out/inout

[Mesa-dev] [PATCH v3 31/32] glsl: teach lower_ubo_reference about samplers inside structures

2017-05-02 Thread Samuel Pitoiset
In a situation like: (tex vec4 (record_ref (var_ref f) tex) (constant vec2 (0.00 0.00)) 0 1 () ) The sampler needs to be lowered, otherwise this ends up with "ir_dereference_variable @ 0x229a100 specifies undeclared variable `ubo_load_temp' @ 0x2290440" Signed-off-by: Samuel

[Mesa-dev] [PATCH v3 27/32] glsl: implement ARB_bindless_texture conversions

2017-05-02 Thread Samuel Pitoiset
From section 5.4.1 of the ARB_bindless_texture spec: "In the following four constructors, the low 32 bits of the sampler type correspond to the .x component of the uvec2 and the high 32 bits correspond to the .y component." uvec2(any sampler type) // Converts a sampler type to

[Mesa-dev] [PATCH v3 18/32] glsl: reject bindless samplers/images frag inputs without 'flat'

2017-05-02 Thread Samuel Pitoiset
From section 4.3.4 of the ARB_bindless_texture spec "(modify last paragraph, p. 35, allowing samplers and images as fragment shader inputs) ... Fragment inputs can only be signed and unsigned integers and integer vectors, floating point scalars, floating-point vectors, matrices,

[Mesa-dev] [PATCH v3 23/32] glsl: allow bindless samplers/images to be initialized

2017-05-02 Thread Samuel Pitoiset
From section 4.1.7 of the ARB_bindless_texture spec: "Samplers may be declared as shader inputs and outputs, as uniform variables, as temporary variables, and as function parameters." From section 4.1.X of the ARB_bindless_texture spec: "Images may be declared as shader inputs and

[Mesa-dev] [PATCH v3 25/32] glsl: add is_valid_constructor() helper function

2017-05-02 Thread Samuel Pitoiset
This will help for the explicit conversions for sampler and image types as specified by ARB_bindless_texture. Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle ---

[Mesa-dev] [PATCH v3 26/32] glsl: allow bindless samplers/images to be used with constructors

2017-05-02 Thread Samuel Pitoiset
For the explicit conversions. From section 4.1.7 of the ARB_bindless_texture spec: "Samplers are represented using 64-bit integer handles, and may be converted to and from 64-bit integers using constructors." From section 4.1.X of the ARB_bindless_texture spec: "Images are

[Mesa-dev] [PATCH v3 19/32] glsl: relax bindless sampler arrays indexing

2017-05-02 Thread Samuel Pitoiset
From section 4.1.7 of the ARB_bindless_texture spec: "Samplers aggregated into arrays within a shader (using square brackets []) can be indexed with arbitrary integer expressions." v3: - update spec comment formatting Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH v3 17/32] glsl: allow bindless samplers/images as vertex shader inputs

2017-05-02 Thread Samuel Pitoiset
From section 4.3.4 of the ARB_bindless_texture spec: "(modify third paragraph of the section to allow sampler and image types) ... Vertex shader inputs can only be float, single-precision floating-point scalars, single-precision floating-point vectors, matrices, signed and

[Mesa-dev] [PATCH v3 13/32] glsl: allow bindless images to be declared inside structures

2017-05-02 Thread Samuel Pitoiset
The spec doesn't clearly state this, but I have got clarification from the spec authors. Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle --- src/compiler/glsl/ast_to_hir.cpp | 2

[Mesa-dev] [PATCH v3 16/32] glsl: allow bindless samplers/images as varying variables

2017-05-02 Thread Samuel Pitoiset
From section 4.3.4 of the ARB_bindless_texture spec: "(modify third paragraph of the section to allow sampler and image types) ... Vertex shader inputs can only be float, single-precision floating-point scalars, single-precision floating-point vectors, matrices, signed and

[Mesa-dev] [PATCH v3 15/32] glsl: allow input memory qualifiers for images

2017-05-02 Thread Samuel Pitoiset
ARB_bindless_texture spec allows images to be declared as shader inputs. v2: - put the */ on the following line (Timothy Arceri) Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle

[Mesa-dev] [PATCH v3 14/32] glsl: allow image qualifiers inside structures

2017-05-02 Thread Samuel Pitoiset
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. Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH v3 10/32] glsl: allow bindless samplers/images as out and inout parameters

2017-05-02 Thread Samuel Pitoiset
From section 4.1.7 of the ARB_bindless_texture spec: "Samplers can be used as l-values, so can be assigned into and used as "out" and "inout" function parameters." From section 4.1.X of the ARB_bindless_texture spec: "Images can be used as l-values, so can be assigned into and used as

[Mesa-dev] [PATCH v3 11/32] glsl: allow bindless samplers/images as function return

2017-05-02 Thread Samuel Pitoiset
The ARB_bindless_texture spec doesn't clearly state this, but as it says "Replace Section 4.1.7 (Samplers), p. 25" and, "Replace Section 4.1.X, (Images)", this should be allowed. v3: - add spec comment - update the glsl error message Signed-off-by: Samuel Pitoiset

[Mesa-dev] [PATCH v3 08/32] glsl: process bindless/bound layout qualifiers

2017-05-02 Thread Samuel Pitoiset
This adds bindless_sampler and bound_sampler (and respectively bindless_image and bound_image) to the parser. v3: - add an extra space in apply_bindless_qualifier_to_variable() - fix indentation in merge_qualifier() Signed-off-by: Samuel Pitoiset Reviewed-by:

[Mesa-dev] [PATCH v3 12/32] glsl: allow bindless samplers/images inside interface blocks

2017-05-02 Thread Samuel Pitoiset
From section 4.3.7 of the ARB_bindless_texture spec: "(remove the following bullet from the last list on p. 39, thereby permitting sampler types in interface blocks; image types are also permitted in blocks by this extension)" * sampler types are not allowed v3: - update the spec

[Mesa-dev] [PATCH v3 07/32] glsl: do not make sampler/image types readonly variables

2017-05-02 Thread Samuel Pitoiset
In plain GLSL, sampler and image types can only be declared uniform-qualified global variables or 'in' function parameters. Setting the read_only flag seems quite useless because other checks will prevent sampler/image variables to be assigned and also because the flag is not set for atomic_uint

[Mesa-dev] [PATCH v3 09/32] glsl: allow to declare bindless samplers/images as non-uniform

2017-05-02 Thread Samuel Pitoiset
From section 4.1.7 of the ARB_bindless_texture spec: "Samplers may be declared as shader inputs and outputs, as uniform variables, as temporary variables, and as function parameters." From section 4.1.X of the ARB_bindless_texture spec: "Images may be declared as shader inputs and

[Mesa-dev] [PATCH v3 05/32] glsl: make count_attribute_slots() returns 1 for samplers/images

2017-05-02 Thread Samuel Pitoiset
For packed varyings. Signed-off-by: Samuel Pitoiset --- src/compiler/glsl_types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index 89f611d0cb..23f45630af 100644 ---

[Mesa-dev] [PATCH v3 06/32] glsl: make sampler/image scalar types

2017-05-02 Thread Samuel Pitoiset
As a side effect, this will magically fix std140/std430 interfaces for bindless samplers/images and will help for implementing the explicit conversions with constructors. Signed-off-by: Samuel Pitoiset --- src/compiler/glsl_types.h | 2 +- 1 file changed, 1

[Mesa-dev] [PATCH v3 02/32] glsl: add ARB_bindless_texture enable

2017-05-02 Thread Samuel Pitoiset
This also adds the extension to the standalone GLSL compiler. Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle ---

[Mesa-dev] [PATCH v3 04/32] glsl: make component_slots() returns 2 for samplers/images

2017-05-02 Thread Samuel Pitoiset
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, if we use N uint uniforms, they occupy N * 16

[Mesa-dev] [PATCH v3 01/32] mesa: add ARB_bindless_texture to the extensions list

2017-05-02 Thread Samuel Pitoiset
This is required for the following GLSL bits. Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- src/mesa/main/extensions_table.h | 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) diff --git

[Mesa-dev] [PATCH v3 00/32] ARB_bindless_texture: round one (GLSL)

2017-05-02 Thread Samuel Pitoiset
Hi, The latest revision (and hopefully the last one) which should address all previous/feedbacks. No regressions with a full piglit run (including compiler tests), and my private shader-db doesn't report anything bad (RadeonSI). The Intel CI system doesn't report any failures now. Please

[Mesa-dev] [PATCH v3 03/32] glsl: make sampler/image types as 64-bit

2017-05-02 Thread Samuel Pitoiset
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 sampler and image types as 64-bit unsigned integer. This introduces a temporary workaround in

Re: [Mesa-dev] [PATCH] radv: don't leak DRM devices

2017-05-02 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Tue, May 2, 2017 at 7:17 PM, Grazvydas Ignotas wrote: > After successful drmGetDevices2() call, drmFreeDevices() needs to be > called. > > Fixes: 743315f2 "radv: do not open random render node(s)" > Signed-off-by:

Re: [Mesa-dev] [PATCH] radv: fix possible stack corruption

2017-05-02 Thread Bas Nieuwenhuizen
Some defensive programming can't hurt. Reviewed-by: Bas Nieuwenhuizen On Tue, May 2, 2017 at 7:17 PM, Grazvydas Ignotas wrote: > drmGetDevices2 takes count and not size. Probably hasn't caused problems > yet in practice and was missed as setups with

Re: [Mesa-dev] [PATCH 0/4] Call for testing: Gallium set_index_buffer removal etc.

2017-05-02 Thread Cherniak, Bruce
> PART 2: Call for testing > > These drivers have been tested: > - ddebug > - llvmpipe > - r300 (also with SWTCL) > - r600 > - radeonsi > - softpipe > - trace > > These drivers need testing: > - etnaviv > - freedreno > - nv30 > - nv50 > - nvc0 > - svga > - swr > - vc4 > - virgl Tested on swr.

Re: [Mesa-dev] [PATCH 4/5] glsl: Don't allow redefining builtin functions on GLSL 1.00.

2017-05-02 Thread Samuel Pitoiset
Except a nitpick on patch 1, patches 1-4 are: Reviewed-by: Samuel Pitoiset On 05/02/2017 07:36 PM, Eric Anholt wrote: The spec text cited above says you can't, but only the GLSL 3.00 (redefine or overload) case was implemented. Fixes dEQP

Re: [Mesa-dev] [PATCH 1/5] glsl: Restrict functions to not return arrays or SOAs in GLSL 1.00.

2017-05-02 Thread Samuel Pitoiset
On 05/02/2017 07:36 PM, Eric Anholt wrote: From the spec, Arrays are allowed as arguments, but not as the return type. [...] The return type can also be a structure if the structure does not contain an array. Fixes DEQP

Re: [Mesa-dev] [PATCH 2/5] gallium: Add support for 5551 with the 1-bit field in the low bit.

2017-05-02 Thread Roland Scheidegger
Am 02.05.2017 um 21:33 schrieb Eric Anholt: > --- > > Do I have the swizzles right here? It's a bit complicated because I > have a reswizzle in vc4, so I may have just massaged things to work > out in my case. I tried a lot of combinations trying to specify BE > swizzles in a way that wouldn't

Re: [Mesa-dev] [PATCH 0/4] Call for testing: Gallium set_index_buffer removal etc.

2017-05-02 Thread Eric Anholt
Marek Olšák writes: > PART 2: Call for testing > > These drivers have been tested: > - ddebug > - llvmpipe > - r300 (also with SWTCL) > - r600 > - radeonsi > - softpipe > - trace > > These drivers need testing: > - etnaviv > - freedreno > - nv30 > - nv50 > - nvc0 > - svga > -

[Mesa-dev] [PATCH] etnaviv: add L8A8_UNORM texture format

2017-05-02 Thread Christian Gmeiner
No piglit regressions. Signed-off-by: Christian Gmeiner --- src/gallium/drivers/etnaviv/etnaviv_format.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_format.c b/src/gallium/drivers/etnaviv/etnaviv_format.c index

[Mesa-dev] [PATCH] radv: always free nir shaders from modules on stack

2017-05-02 Thread Grazvydas Ignotas
valgrind reports them as leaked, and I could not find anything making a copy of the nir pointer. Also, radv_device_init_meta_blit_color() is already freeing them unconditionally like this. Signed-off-by: Grazvydas Ignotas --- src/amd/vulkan/radv_meta_blit.c | 6 ++

Re: [Mesa-dev] [PATCH 5/5] radv: drop unused surface level members.

2017-05-02 Thread Bas Nieuwenhuizen
Series is Reviewed-by: Bas Nieuwenhuizen Fee free to disregard my comment on patch 1, given that its implementation is almost immediately overwritten. On Tue, May 2, 2017 at 2:22 AM, Dave Airlie wrote: > From: Dave Airlie > >

Re: [Mesa-dev] [PATCH] renderonly: use drmIoctl

2017-05-02 Thread Stéphane Marchesin
On Fri, Apr 28, 2017 at 6:06 AM, Emil Velikov wrote: > On 28 April 2017 at 13:55, Eric Engestrom > wrote: > > On Friday, 2017-04-28 13:14:20 +0200, Philipp Zabel wrote: > >> To restart interrupted system calls, use drmIoctl. > >> > >>

Re: [Mesa-dev] [PATCH 1/5] radv: provide a helper for comparing an image extents.

2017-05-02 Thread Bas Nieuwenhuizen
On Tue, May 2, 2017 at 2:22 AM, Dave Airlie wrote: > From: Dave Airlie > > This just makes it easier to do the follow in cleanups of the surface. > > Signed-off-by: Dave Airlie > --- > src/amd/vulkan/radv_meta_clear.c | 4 ++-- >

Re: [Mesa-dev] [PATCH] st/glsl_to_tgsi: fix the DCE pass in presence of loops

2017-05-02 Thread Edmondo Tommasina
The issue in Uningine Heaven is fixed. Tested-by: Edmondo Tommasina Thanks edmondo On Tue, May 2, 2017 at 4:43 PM, Samuel Pitoiset wrote: > The TGSI DCE pass doesn't eliminate dead assignments like > MOV TEMP[0], TEMP[1] in presence of

  1   2   3   >