From: Connor Abbott <cwabbo...@gmail.com> This series adds all the bits to enable EXT_shader_subgroup_vote and EXT_shader_subgroup_ballot for radv. It's based on my previous series to fix some 64-bit bugs in radv and anv, since nothing would work without them.
Patches 1-4 are a resend of my previous series to add ARB_shader_ballot and ARB_shader_group_vote support to NIR, with some changes suggested by Jason and minor bugfixes. Patches 5-8 add SPIRV-to-NIR support for the SPIR-V extensions. Finally, the rest of the patches move some of the existing logic for ARB_shader_ballot and ARB_shader_group_vote into ac when appropriate and turn on the extension for radv. One question I had was about how to handle the differences between SPIR-V and GL here. SPIR-V decided to make the things that return a bitmask of invocations return a uvec4, whereas in the GL extension they return a uint64_t. Right now, in NIR, we use the GL semantics, and we translate that in vtn. I'm open to changing that, though. I wrote a few crucible tests to test the extension (mostly copied from the piglit ARB_shader_ballot and ARB_shader_group_vote coverage), which I'll send out shortly. One of the tests is crashing because of https://github.com/KhronosGroup/glslang/issues/930, but other than that it passes the tests. I also made sure I didn't regress piglit on radeonsi. It might be a good idea to run it on Intel's CI system, especially given patches 5 and 6. This series is also available at: git://people.freedesktop.org/~cwabbott0/mesa radv-shader-ballot Connor Abbott (17): nir: introduce new convergent and cross-thread attributes nir/gcm: use the new cross-thread attribute nir: take cross-thread operations into account into a few places nir: add ARB_shader_ballot and ARB_shader_group_vote instructions mesa: fix 64-bit issues with system_values_read compiler: add new system values for SPV_KHR_shader_ballot nir/lower_system_values: handle SPIR-V shader_ballot system values nir/spirv: add plumbing for KHR_shader_ballot and KHR_subgroup_vote ac: add i32_0 convenience member to ac_llvm_context radeonsi: move llvm_get_type_size() to ac radeonsi: move emit_optimization_barrier() to ac ac: add i64 type to ac_llvm_context radeonsi: move si_emit_ballot() to ac ac: add i32_1 convenience member to ac_llvm_context radeonsi: move the guts of ARB_shader_group_vote emission to ac ac: enable the AMDGPU asm parser radv/ac: enable EXT_shader_subgroup_ballot and EXT_shader_subgroup_vote src/amd/common/ac_llvm_build.c | 127 +++++++++++++++++++++++++++ src/amd/common/ac_llvm_build.h | 18 ++++ src/amd/common/ac_llvm_util.c | 4 + src/amd/common/ac_nir_to_llvm.c | 75 ++++++++++++++++ src/amd/vulkan/radv_device.c | 8 ++ src/amd/vulkan/radv_pipeline.c | 2 + src/compiler/nir/nir.c | 28 ++++++ src/compiler/nir/nir.h | 80 +++++++++++++++++ src/compiler/nir/nir_instr_set.c | 22 +++++ src/compiler/nir/nir_intrinsics.h | 30 +++++++ src/compiler/nir/nir_lower_system_values.c | 38 ++++++++ src/compiler/nir/nir_opt_gcm.c | 72 +++++---------- src/compiler/nir/nir_opt_peephole_select.c | 11 +++ src/compiler/shader_enums.c | 5 ++ src/compiler/shader_enums.h | 11 +++ src/compiler/spirv/nir_spirv.h | 2 + src/compiler/spirv/spirv_to_nir.c | 80 +++++++++++++++++ src/compiler/spirv/vtn_variables.c | 28 ++++++ src/gallium/auxiliary/nir/tgsi_to_nir.c | 2 +- src/gallium/drivers/radeonsi/si_shader.c | 136 +++-------------------------- src/intel/compiler/brw_vec4_gs_visitor.cpp | 3 +- src/mesa/program/programopt.c | 2 +- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 9 +- src/mesa/state_tracker/st_mesa_to_tgsi.c | 6 +- 24 files changed, 617 insertions(+), 182 deletions(-) -- 2.9.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev