[Mesa-dev] [PATCH] radv: Optimize rebinding the same descriptor set.

2018-09-15 Thread Bas Nieuwenhuizen
Thsi makes it cheaper to just change the dynamic offsets with the same descriptor sets. Suggested-by: Philip Rebohle --- src/amd/vulkan/radv_cmd_buffer.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c

Re: [Mesa-dev] [PATCH 00/26] ARB_gl_spirv: ubo/ssbo support

2018-09-15 Thread Alejandro Piñeiro
On 15/09/18 18:35, Jason Ekstrand wrote: > On Sat, Sep 15, 2018 at 11:19 AM Alejandro Piñeiro > mailto:apinhe...@igalia.com>> wrote: > > Hi, > > this series adds the support for UBO and SSBO. The following patches > can be classified as: > >  * Patches 1-8: changes on spirv to nir t

[Mesa-dev] [Bug 107914] [DXVK] Crashes of 32 bit games with RADV on AMD Raven

2018-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107914 Bas Nieuwenhuizen changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 107914] [DXVK] Crashes of 32 bit games with RADV on AMD Raven

2018-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107914 --- Comment #10 from Bas Nieuwenhuizen --- Created attachment 141575 --> https://bugs.freedesktop.org/attachment.cgi?id=141575&action=edit Hack to get the applications working. -- You are receiving this mail because: You are the assignee for

[Mesa-dev] [Bug 107865] swr fail to build with llvm-libs 6.0.1

2018-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107865 --- Comment #2 from Bruce Cherniak --- Thank you for tracking this down! That helps a lot! -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.__

Re: [Mesa-dev] [PATCH 00/26] ARB_gl_spirv: ubo/ssbo support

2018-09-15 Thread Jason Ekstrand
On Sat, Sep 15, 2018 at 11:19 AM Alejandro Piñeiro wrote: > Hi, > > this series adds the support for UBO and SSBO. The following patches > can be classified as: > > * Patches 1-8: changes on spirv to nir to take into account ubo and >ssbo, so it would be compatible to what OpenGL expects (li

[Mesa-dev] [PATCH 26/26] mesa: add NULL name check for NUM_ACTIVE_VARIABLES query

2018-09-15 Thread Alejandro Piñeiro
This can happens if we are running an SPIR-V shader (ARB_gl_spirv). --- src/mesa/main/shader_query.cpp | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 11ecd71c575..b775b4231c2

[Mesa-dev] [PATCH 25/26] i965: call to gl_nir_link_uniform_blocks

2018-09-15 Thread Alejandro Piñeiro
When using a SPIR-V shader. Note that needs to be done before linking uniforms, so when creating the uniform storage entries, block_index could be filled properly (among other things). --- src/mesa/drivers/dri/i965/brw_link.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drive

[Mesa-dev] [PATCH 24/26] i965: use GLboolean for all brw_link_shader returns

2018-09-15 Thread Alejandro Piñeiro
The function had a mix of true/GL_TRUE and false/GL_FALSE returns. Using GL_TRUE/GL_FALSE as the function returns a GLboolean. --- src/mesa/drivers/dri/i965/brw_link.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/dri

[Mesa-dev] [PATCH 23/26] nir/linker: add program ubo/ssbo at the resource list

2018-09-15 Thread Alejandro Piñeiro
--- src/compiler/glsl/gl_nir_linker.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index 547549bc4e0..138a12e532d 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@

[Mesa-dev] [PATCH 22/26] nir/linker: Set the uniform's block_index

2018-09-15 Thread Alejandro Piñeiro
From: Antia Puentes Binding comparison is used to determine the block the uniform is part of. To do the binding comparison we need the information in UniformBlocks[] and ShaderStorageBlocks[] to be available, so we have to call gl_nir_link_uniform_blocks() before linking the uniforms. --- src/co

[Mesa-dev] [PATCH 17/26] nir/linker: add gl_nir_link_uniform_blocks.c

2018-09-15 Thread Alejandro Piñeiro
Adding the ability to link uniform blocks and shader storage blocks using NIR, intended for ARB_gl_spirv support. Among other things, this linking needs to take into account that everything should work without names, as they could be not present, while the GLSL IR uniform block linking was wrote wi

[Mesa-dev] [PATCH 21/26] nir/linker: update already processed uniforms search for UBOs/SSBOs

2018-09-15 Thread Alejandro Piñeiro
Until now, we were using the uniform explicit location to check if the current nir variable already was processed, and entries on the uniform storage added. But for UBOs/SSBOs, entries are added but we lack a explicit location. For those we need to rely on the UBO/SSBO binding (to the nir variable

[Mesa-dev] [PATCH 19/26] nir/linker: use only the array element type for array of ssbo/ubo

2018-09-15 Thread Alejandro Piñeiro
For this interfaces, the inner members are added only once as uniforms or resources, in opposite to other cases, like a uniform array of structs. --- src/compiler/glsl/gl_nir_link_uniforms.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/compile

[Mesa-dev] [PATCH 18/26] nir/linker: fill is_shader_storage for uniforms

2018-09-15 Thread Alejandro Piñeiro
--- src/compiler/glsl/gl_nir_link_uniforms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c index 1a491dc2e5d..00995fb3f76 100644 --- a/src/compiler/glsl/gl_nir_link_uniforms.c +++ b/src/com

[Mesa-dev] [PATCH 14/26] nir: add is_in_ubo/ssbo/block helpers

2018-09-15 Thread Alejandro Piñeiro
Equivalent to the already existing ir_variable is_in_buffer_block and is_in_shader_storage_block, adding the uniform buffer object one. I'm using the short forms (ssbo, ubo) to avoid having method names too long. --- src/compiler/nir/nir.h | 22 ++ 1 file changed, 22 insertions

[Mesa-dev] [PATCH 16/26] nir/linker: handle non-ubo uses of vulkan_resource_index

2018-09-15 Thread Alejandro Piñeiro
From: Neil Roberts In order to replicate the behaviour of lower_ubo_reference_visitor, the lowering code should search the list of blocks in ShaderStorageBlocks for the matching binding whenever a non-ubo usage of the resource index is encountered. The intended usage of the vulkan_resource_index

[Mesa-dev] [PATCH 20/26] nir/linker: fill up uniform_storage with explicit data

2018-09-15 Thread Alejandro Piñeiro
Specifically, offset, array_stride, matrix_stride and row_major. On GLSL, most of that info is computed, but on ARB_gl_spirv they are explicit, and for Mesa, included on the glsl_type. From ARB_gl_spirv spec: "Mapping of layouts std140/std430 -> explicit *Offset*, *ArrayStride*, and

[Mesa-dev] [PATCH 15/26] nir/linker/i965: Lower vulkan_resource_index during linking

2018-09-15 Thread Alejandro Piñeiro
From: Neil Roberts When linking a program using ARB_gl_spirv it now lowers the vulkan_resource_index intrinsic as an extra pass on the nir shader. Unlike Vulkan this can be done without waiting for the extra state from the pipeline layout. It also adds the call to this lowering on the i965 drive

[Mesa-dev] [PATCH 13/26] spirv/nir: fill glsl_type array stride

2018-09-15 Thread Alejandro Piñeiro
We need all the info when asking for the type, so we needed to call type_decoration_cb earlier, in order to get the ArrayStride. It is somewhat ugly to do this only for Array types, but we can't do it before the switch as type_decoration_cb have some asserts to ensure that the type and the decorat

[Mesa-dev] [PATCH 12/26] glsl_types/nir: add explicit_array_stride plus nir wrapper helpers

2018-09-15 Thread Alejandro Piñeiro
From ARB_gl_spirv: "Mapping of layouts std140/std430 -> explicit *Offset*, *ArrayStride*, and *MatrixStride* Decoration on struct members" That means that we would not have available any kind of layout info, and we should use explicit array strides. This comm

[Mesa-dev] [PATCH 10/26] glsl_types/nir: add matrix_stride plus nir wrapper helpers

2018-09-15 Thread Alejandro Piñeiro
From ARB_gl_spirv spec: "7.6.2.spv SPIR-V Uniform Offsets and Strides The SPIR-V decorations *GLSLShared* or *GLSLPacked* must not be used. A variable in the *Uniform* Storage Class decorated as a *Block* must be explicitly laid out using the *Offset*, *ArrayStride*, and *Matr

[Mesa-dev] [PATCH 07/26] spirv/nir: don't set interface_type if it is not a struct

2018-09-15 Thread Alejandro Piñeiro
vnt_variables uses interface_type on several use cases, but on nir variable it is more limited. From nir.h: /** * For variables that are in an interface block or are an instance of an * interface block, this is the \c GLSL_TYPE_INTERFACE type for that block. * * \sa ir_varia

[Mesa-dev] [PATCH 02/26] spirv/nir: translate ssbo

2018-09-15 Thread Alejandro Piñeiro
They are supported by SPIR-V for OpenGL. OpenGL codepath expect nir to include the ssbo as nir variables. --- src/compiler/spirv/vtn_variables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index ba

[Mesa-dev] [PATCH 04/26] spirv/nir: fill up nir variable info for ubos and ssbo

2018-09-15 Thread Alejandro Piñeiro
Some nir variables are only filled up for some specific modes. We found to need the binding for ubos/ssbos. The comment before that code (starts with XXX) points that binding still needs to be filled up for uniform variables at that point, and that should be fixed, although it doesn't specify why

[Mesa-dev] [PATCH 11/26] spirv/nir: fill glsl_struct_field explicit_matrix_stride

2018-09-15 Thread Alejandro Piñeiro
--- src/compiler/spirv/spirv_to_nir.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 101e2b0bf02..02de2f640c1 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -798,6 +79

[Mesa-dev] [PATCH 05/26] spirv/nir: include SPIR-V explicit offset on the glsl struct type

2018-09-15 Thread Alejandro Piñeiro
From ARB_gl_spirv spec: "Mapping of layouts std140/std430 -> explicit *Offset*, *ArrayStride*, and *MatrixStride* Decoration on struct members" and "A variable in the *Uniform* Storage Class decorated as a *Block* must be explicitly laid out using the *Offset*

[Mesa-dev] [PATCH 09/26] nir/types: add three new wrapper helpers

2018-09-15 Thread Alejandro Piñeiro
To already existing fields on glsl_types. Specifically: * glsl_get_struct_field_offset * glsl_get_struct_field_matrix_layout * glsl_type_arrays_of_arrays_size --- src/compiler/nir_types.cpp | 21 + src/compiler/nir_types.h | 8 2 files changed, 29 insertion

[Mesa-dev] [PATCH 08/26] spirv/nir: Handle location decorations on block interface members

2018-09-15 Thread Alejandro Piñeiro
From: Neil Roberts Previously the code was taking any location decoration on the block and using that to calculate the member locations for all of the members. I think this was assuming that there would only be one location decoration for the entire block. According to the Vulkan spec it is possi

[Mesa-dev] [PATCH 06/26] spirv/nir: include row major coming from SPIR-V on the glsl type

2018-09-15 Thread Alejandro Piñeiro
--- src/compiler/spirv/spirv_to_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 15a3e8cce9a..101e2b0bf02 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -725,6 +725,7 @@

[Mesa-dev] [PATCH 01/26] spirv/nir: translate uniform blocks

2018-09-15 Thread Alejandro Piñeiro
They are supported by SPIR-V for ARB_gl_spirv. --- src/compiler/spirv/vtn_variables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 358ff4bef7a..ba1b8816038 100644 --- a/src/compiler/spirv/vtn_

[Mesa-dev] [PATCH 03/26] spirv/nir: setting interface type for ubos/ssbos

2018-09-15 Thread Alejandro Piñeiro
Right now, a type is considered a ubo/ssbo if the mode is uniform/shader_storage and the interface_type is different to NULL. See ir_variable::in_in_buffer_block as an example. --- src/compiler/spirv/vtn_variables.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sr

[Mesa-dev] [PATCH 00/26] ARB_gl_spirv: ubo/ssbo support

2018-09-15 Thread Alejandro Piñeiro
Hi, this series adds the support for UBO and SSBO. The following patches can be classified as: * Patches 1-8: changes on spirv to nir to take into account ubo and ssbo, so it would be compatible to what OpenGL expects (like having a interface_type, the correct mode, etc). * Patch 09: som

[Mesa-dev] [Bug 107865] swr fail to build with llvm-libs 6.0.1

2018-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107865 --- Comment #1 from Steven Noonan --- I found out that this build apparently only fails when building from the release tarball, presumably because of these differences (recursive diff between git tree and release tarball follows): Only in mesa-

[Mesa-dev] [Bug 107865] swr fail to build with llvm-libs 6.0.1

2018-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107865 Steven Noonan changed: What|Removed |Added CC||ste...@uplinklabs.net -- You are recei

[Mesa-dev] [Bug 107942] Isaac AntiBirth under wine has invisible entities tu to clipping plane issue

2018-09-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=107942 Bug ID: 107942 Summary: Isaac AntiBirth under wine has invisible entities tu to clipping plane issue Product: Mesa Version: 18.2 Hardware: Other OS: All