radv: rename RADV_SHADER_QUERY_PIPELINE_STAT_OFFSET
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jul 2023 07:32:32 +0000 (09:32 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 27 Jul 2023 07:13:11 +0000 (09:13 +0200)
To RADV_SHADER_QUERY_GS_PRIM_EMIT_OFFSET.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231>

src/amd/vulkan/nir/radv_nir_lower_abi.c
src/amd/vulkan/radv_constants.h
src/amd/vulkan/radv_query.c

index aed4bb4..b0252ba 100644 (file)
@@ -347,7 +347,7 @@ lower_abi_instr(nir_builder *b, nir_instr *instr, void *state)
       break;
    }
    case nir_intrinsic_atomic_add_gs_emit_prim_count_amd:
-      nir_gds_atomic_add_amd(b, 32, intrin->src[0].ssa, nir_imm_int(b, RADV_SHADER_QUERY_PIPELINE_STAT_OFFSET),
+      nir_gds_atomic_add_amd(b, 32, intrin->src[0].ssa, nir_imm_int(b, RADV_SHADER_QUERY_GS_PRIM_EMIT_OFFSET),
                              nir_imm_int(b, 0x100));
       break;
    case nir_intrinsic_atomic_add_gen_prim_count_amd:
index bf9a31e..f508e1e 100644 (file)
 
 /* Shader GDS counters:
  *   offset  0| 4| 8|12  - reserved for NGG streamout counters
- *   offset 16           - pipeline statistics counter for all streams
+ *   offset 16           - number of primitives generated by geometry shader invocations
  *   offset 20|24|28|32  - generated primitive counter for stream 0|1|2|3
  *   offset 36|40|44|48  - written primitive counter for stream 0|1|2|3
  */
-#define RADV_SHADER_QUERY_PIPELINE_STAT_OFFSET    16
+#define RADV_SHADER_QUERY_GS_PRIM_EMIT_OFFSET     16
 #define RADV_SHADER_QUERY_PRIM_GEN_OFFSET(stream) (20 + stream * 4)
 #define RADV_SHADER_QUERY_PRIM_XFB_OFFSET(stream) (36 + stream * 4)
 
index d2d0819..dfcf546 100644 (file)
@@ -1738,7 +1738,7 @@ emit_begin_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *poo
          va += gs_prim_offset;
 
          /* pipeline statistics counter for all streams */
-         gfx10_copy_gds_query(cmd_buffer, RADV_SHADER_QUERY_PIPELINE_STAT_OFFSET, va);
+         gfx10_copy_gds_query(cmd_buffer, RADV_SHADER_QUERY_GS_PRIM_EMIT_OFFSET, va);
 
          /* Record that the command buffer needs GDS. */
          cmd_buffer->gds_needed = true;
@@ -1882,7 +1882,7 @@ emit_end_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *pool,
          va += gs_prim_offset;
 
          /* pipeline statistics counter for all streams */
-         gfx10_copy_gds_query(cmd_buffer, RADV_SHADER_QUERY_PIPELINE_STAT_OFFSET, va);
+         gfx10_copy_gds_query(cmd_buffer, RADV_SHADER_QUERY_GS_PRIM_EMIT_OFFSET, va);
 
          cmd_buffer->state.active_pipeline_gds_queries--;