[Mesa-dev] [PATCH 0/3] Fixes for 64-bit support on radv and anv

Connor Abbott connora at valvesoftware.com
Thu Jun 8 22:05:32 UTC 2017

From: Connor Abbott <cwabbott0 at gmail.com>

This series fixes a few things I noticed while adding support for the
shader ballot extension to radv. In order to convert from the GLSL
semantics to the SPIR-V semantics for ballotARB(), glslang inserts a
call to unpackUint2x32, which maps to OpBitcast in SPIR-V which we
weren't translating correctly in this case. The first patch fixes that
in the common SPIRV-to-NIR code. Then I discovered that radv wasn't even
implementing the corresponding NIR opcode, which I fixed in the second
patch. Finally, I added Dave's patch to enable the int64 device feature;
it seems that testing is pretty sparse for it, since these issues
slipped through unnoticed, but it's going to be required by more and
more games since it's effectively required for ballot support (unless
you're generating your own SPIR-V without using glslang), and anv
already enables it, so we might as well.

I have a few crucible tests which demonstrate the bugs that I'm going to
send out shortly. I haven't tested anv, but radv passes them after this
patch series.

This series is also available at:
git://people.freedesktop.org/~cwabbott0/mesa radv-anv-64bit-patches

Connor Abbott (2):
  spirv: fix OpBitcast when the src and dst bitsize are different
  ac/nir: implement 64-bit packing and unpacking

Dave Airlie (1):
  radv: enable Int64 capability (v2)

 src/amd/common/ac_nir_to_llvm.c | 31 +++++++++++++++++++
 src/amd/vulkan/radv_device.c    |  2 +-
 src/amd/vulkan/radv_pipeline.c  |  2 ++
 src/compiler/spirv/vtn_alu.c    | 68 ++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 101 insertions(+), 2 deletions(-)


More information about the mesa-dev mailing list