diff options
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r-- | src/amd/vulkan/radv_private.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index adfd75c2a87..e2fa58d8d1e 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -57,6 +57,7 @@ #include "ac_nir_to_llvm.h" #include "ac_gpu_info.h" #include "ac_surface.h" +#include "ac_llvm_build.h" #include "radv_descriptor_set.h" #include "radv_extensions.h" #include "radv_cs.h" @@ -1130,12 +1131,21 @@ bool radv_get_memory_fd(struct radv_device *device, int *pFD); static inline void -radv_emit_shader_pointer(struct radeon_winsys_cs *cs, - uint32_t sh_offset, uint64_t va) +radv_emit_shader_pointer(struct radv_device *device, + struct radeon_winsys_cs *cs, + uint32_t sh_offset, uint64_t va, bool global) { - radeon_set_sh_reg_seq(cs, sh_offset, 2); + bool use_32bit_pointers = HAVE_32BIT_POINTERS && !global; + + radeon_set_sh_reg_seq(cs, sh_offset, use_32bit_pointers ? 1 : 2); radeon_emit(cs, va); - radeon_emit(cs, va >> 32); + + if (use_32bit_pointers) { + assert(va == 0 || + (va >> 32) == device->physical_device->rad_info.address32_hi); + } else { + radeon_emit(cs, va >> 32); + } } static inline struct radv_descriptor_state * |