radv/gfx10: update descriptors for inline uniform blocks
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 18 Jul 2019 13:51:33 +0000 (15:51 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 22 Jul 2019 07:02:42 +0000 (09:02 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_nir_to_llvm.c

index fa1413bf8d09156b1ee9f11a96a5945a74915d78..336bae28614c542097fe5abdb3adbda4c5dc741c 100644 (file)
@@ -1373,9 +1373,16 @@ radv_load_resource(struct ac_shader_abi *abi, LLVMValueRef index,
                uint32_t desc_type = S_008F0C_DST_SEL_X(V_008F0C_SQ_SEL_X) |
                        S_008F0C_DST_SEL_Y(V_008F0C_SQ_SEL_Y) |
                        S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) |
-                       S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W) |
-                       S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_FLOAT) |
-                       S_008F0C_DATA_FORMAT(V_008F0C_BUF_DATA_FORMAT_32);
+                       S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W);
+
+               if (ctx->ac.chip_class >= GFX10) {
+                       desc_type |= S_008F0C_FORMAT(V_008F0C_IMG_FORMAT_32_FLOAT) |
+                                    S_008F0C_OOB_SELECT(3) |
+                                    S_008F0C_RESOURCE_LEVEL(1);
+               } else {
+                       desc_type |= S_008F0C_NUM_FORMAT(V_008F0C_BUF_NUM_FORMAT_FLOAT) |
+                                    S_008F0C_DATA_FORMAT(V_008F0C_BUF_DATA_FORMAT_32);
+               }
 
                LLVMValueRef desc_components[4] = {
                        LLVMBuildPtrToInt(ctx->ac.builder, desc_ptr, ctx->ac.intptr, ""),