aco/gfx10: fix inline uniform blocks
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 10 Oct 2019 11:12:29 +0000 (12:12 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Thu, 10 Oct 2019 20:02:36 +0000 (20:02 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
src/amd/compiler/aco_instruction_selection.cpp

index f200588f7141cdd0746f239d2ee1a9aa63282881..d16873f9af34c6611e2519c4f99883f0439342bc 100644 (file)
@@ -3140,9 +3140,15 @@ void visit_load_ubo(isel_context *ctx, nir_intrinsic_instr *instr)
       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->options->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);
+      }
       Temp upper_dwords = bld.pseudo(aco_opcode::p_create_vector, bld.def(s3),
                                      Operand(S_008F04_BASE_ADDRESS_HI(ctx->options->address32_hi)),
                                      Operand(0xFFFFFFFFu),