Mesa (master): radv: fix emitting descriptor pointers with LLVM < 7

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Wed May 30 09:41:06 UTC 2018


Module: Mesa
Branch: master
Commit: 02c7916298e8e29b130735bd30e97c57d40a197f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=02c7916298e8e29b130735bd30e97c57d40a197f

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed May 30 11:15:12 2018 +0200

radv: fix emitting descriptor pointers with LLVM < 7

This was terribly wrong, I forced use of 32-bit pointers when
emitting shader descriptor pointers. This fixes GPU hangs with
LLVM 5&6 because 32-bit pointers are only supported with LLVM 7.

Fixes: 88d1ed0f81 ("radv: emit shader descriptor pointers consecutively")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/vulkan/radv_cmd_buffer.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 8f351b52c9..6ff1f1a6cb 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -624,12 +624,14 @@ radv_emit_descriptor_pointers(struct radv_cmd_buffer *cmd_buffer,
 		struct radv_userdata_info *loc = &locs->descriptor_sets[start];
 		unsigned sh_offset = sh_base + loc->sgpr_idx * 4;
 
-		radv_emit_shader_pointer_head(cs, sh_offset, count, true);
+		radv_emit_shader_pointer_head(cs, sh_offset, count,
+					      HAVE_32BIT_POINTERS);
 		for (int i = 0; i < count; i++) {
 			struct radv_descriptor_set *set =
 				descriptors_state->sets[start + i];
 
-			radv_emit_shader_pointer_body(device, cs, set->va, true);
+			radv_emit_shader_pointer_body(device, cs, set->va,
+						      HAVE_32BIT_POINTERS);
 		}
 	}
 }




More information about the mesa-commit mailing list