radeonsi: move VS_STATE.LS_OUT_PATCH_SIZE a few bits higher to make space there
authorMarek Olšák <marek.olsak@amd.com>
Tue, 24 Dec 2019 01:17:46 +0000 (20:17 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 15 Jan 2020 20:06:31 +0000 (15:06 -0500)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_shader_internal.h

index d68951533a7be00756c6905d34301b221fc74d80..99d4f8188064f675026ab42a1ed97f4d7c1ae36c 100644 (file)
@@ -238,7 +238,7 @@ static LLVMValueRef get_rel_patch_id(struct si_shader_context *ctx)
 static LLVMValueRef
 get_tcs_in_patch_stride(struct si_shader_context *ctx)
 {
-       return si_unpack_param(ctx, ctx->vs_state_bits, 8, 13);
+       return si_unpack_param(ctx, ctx->vs_state_bits, 11, 13);
 }
 
 static unsigned get_tcs_out_vertex_dw_stride_constant(struct si_shader_context *ctx)
index c4792da4782e06190af1bb6231a2f66fd33019b7..7a26083eb49b888790bc8d5db5e2543ecd25f0d9 100644 (file)
@@ -256,8 +256,8 @@ enum {
 #define C_VS_STATE_PROVOKING_VTX_INDEX         0xFFFFFFCF
 #define S_VS_STATE_STREAMOUT_QUERY_ENABLED(x)  (((unsigned)(x) & 0x1) << 6)
 #define C_VS_STATE_STREAMOUT_QUERY_ENABLED     0xFFFFFFBF
-#define S_VS_STATE_LS_OUT_PATCH_SIZE(x)                (((unsigned)(x) & 0x1FFF) << 8)
-#define C_VS_STATE_LS_OUT_PATCH_SIZE           0xFFE000FF
+#define S_VS_STATE_LS_OUT_PATCH_SIZE(x)                (((unsigned)(x) & 0x1FFF) << 11)
+#define C_VS_STATE_LS_OUT_PATCH_SIZE           0xFF0007FF
 #define S_VS_STATE_LS_OUT_VERTEX_SIZE(x)       (((unsigned)(x) & 0xFF) << 24)
 #define C_VS_STATE_LS_OUT_VERTEX_SIZE          0x00FFFFFF
 
index 6d36b9750c7ac2ab9f4a88e483af6275d26d9315..ef2bf2fd7db7f2c739d7d4703786037d431a9bf6 100644 (file)
@@ -95,8 +95,11 @@ struct si_shader_context {
        /* VS states and layout of LS outputs / TCS inputs at the end
         *   [0] = clamp vertex color
         *   [1] = indexed
-        *   [8:20] = stride between patches in DW = num_inputs * num_vertices * 4
-        *            max = 32*32*4 + 32*4
+        *   [2:3] = NGG: output primitive type
+        *   [4:5] = NGG: provoking vertex index
+        *   [6]   = NGG: streamout queries enabled
+        *   [11:23] = stride between patches in DW = num_inputs * num_vertices * 4
+        *             max = 32*32*4 + 32*4
         *   [24:31] = stride between vertices in DW = num_inputs * 4
         *             max = 32*4
         */