Hi, this is the second version of the ubo/ssbo support for ARB_gl_spirv series. Differences compared with v1:
* Rebased against today master. * Patch "nir/linker: use only the array element type for array of ssbo/ubo" got a proper spec quote. * Two extra patches are included. They are not strictly related to ubo/ssbo. Just when I sent v1, I checked how many patches from our development branch were required to pass all the ARB_gl_spirv tests. And they were just two. So although initially the plan was sending them as part of a different series, we decided to send it now, basically because "passing all the CTS tests" is a nice checkpoint, and it would be nice to get it on master. Having said so, note that "passing all the CTS tests" is not "extension is production ready", so we would keep sending series/patches before propose to enable it. And something that was not mentioned on v1 cover-letter, but later on the review thread: this series doesn't include the support for array of arrays of ubo/ssbo. That will be sent later on a different series. The v1 was sent here: https://lists.freedesktop.org/archives/mesa-dev/2018-September/205278.html This series can be found on this branch: https://github.com/Igalia/piglit/tree/arb_gl_spirv-series5-ubo-ssbo-v2 And can be tested with this piglit series: https://github.com/Igalia/piglit/tree/arb_gl_spirv-series5-ubo-ssbo-v2 And as mentioned, with this series would pass the CTS ARB_gl_spirv tests on i965. Alejandro Piñeiro (23): spirv/nir: translate uniform blocks spirv/nir: translate ssbo spirv/nir: setting interface type for ubos/ssbos spirv/nir: fill up nir variable info for ubos and ssbo spirv/nir: include SPIR-V explicit offset on the glsl struct type spirv/nir: include row major coming from SPIR-V on the glsl type spirv/nir: don't set interface_type if it is not a struct nir/types: add three new wrapper helpers glsl_types/nir: add matrix_stride plus nir wrapper helpers spirv/nir: fill glsl_struct_field explicit_matrix_stride glsl_types/nir: add explicit_array_stride plus nir wrapper helpers spirv/nir: fill glsl_type array stride nir: add is_in_ubo/ssbo/block helpers nir/linker: add gl_nir_link_uniform_blocks.c nir/linker: fill is_shader_storage for uniforms nir/linker: use only the array element type for array of ssbo/ubo nir/linker: fill up uniform_storage with explicit data nir/linker: update already processed uniforms search for UBOs/SSBOs nir/linker: add program ubo/ssbo at the resource list i965: use GLboolean for all brw_link_shader returns i965: call to gl_nir_link_uniform_blocks mesa: add NULL name check for NUM_ACTIVE_VARIABLES query mesa: add NULL name check for several length queries Antia Puentes (2): nir/linker: Set the uniform's block_index nir/linker: Add inputs/outputs to the program resource list Neil Roberts (3): spirv/nir: Handle location decorations on block interface members nir/linker/i965: Lower vulkan_resource_index during linking nir/linker: handle non-ubo uses of vulkan_resource_index src/compiler/Makefile.sources | 2 + src/compiler/glsl/gl_nir.h | 4 + src/compiler/glsl/gl_nir_link_uniform_blocks.c | 713 +++++++++++++++++++++ src/compiler/glsl/gl_nir_link_uniforms.c | 178 ++++- src/compiler/glsl/gl_nir_linker.c | 93 +++ src/compiler/glsl/gl_nir_linker.h | 3 + src/compiler/glsl/gl_nir_lower_samplers_as_deref.c | 2 +- .../glsl/gl_nir_lower_vulkan_resource_index.c | 163 +++++ src/compiler/glsl/meson.build | 2 + src/compiler/glsl_types.cpp | 31 +- src/compiler/glsl_types.h | 23 +- src/compiler/nir/nir.h | 22 + src/compiler/nir/nir_lower_io_arrays_to_elements.c | 3 +- src/compiler/nir/nir_split_per_member_structs.c | 3 +- src/compiler/nir/nir_split_vars.c | 3 +- src/compiler/nir_types.cpp | 47 +- src/compiler/nir_types.h | 20 +- src/compiler/spirv/spirv_to_nir.c | 24 +- src/compiler/spirv/vtn_private.h | 6 + src/compiler/spirv/vtn_variables.c | 90 ++- src/mesa/drivers/dri/i965/brw_link.cpp | 12 +- src/mesa/main/shader_query.cpp | 42 +- src/mesa/main/shaderapi.c | 26 +- 23 files changed, 1430 insertions(+), 82 deletions(-) create mode 100644 src/compiler/glsl/gl_nir_link_uniform_blocks.c create mode 100644 src/compiler/glsl/gl_nir_lower_vulkan_resource_index.c -- 2.14.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev