anv: switch to use brw's prog_data source_hash

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33643>
This commit is contained in:
Lionel Landwerlin 2025-02-12 13:06:22 +02:00 committed by Marge Bot
parent da098b76a4
commit 84f96a0199
6 changed files with 82 additions and 74 deletions

View file

@ -157,17 +157,21 @@ anv_measure_start_snapshot(struct anv_cmd_buffer *cmd_buffer,
if (type == INTEL_SNAPSHOT_COMPUTE && cmd_buffer->state.compute.base.pipeline) { if (type == INTEL_SNAPSHOT_COMPUTE && cmd_buffer->state.compute.base.pipeline) {
const struct anv_compute_pipeline *pipeline = const struct anv_compute_pipeline *pipeline =
anv_pipeline_to_compute(cmd_buffer->state.compute.base.pipeline); anv_pipeline_to_compute(cmd_buffer->state.compute.base.pipeline);
snapshot->cs = pipeline->source_hash; snapshot->cs = pipeline->cs->prog_data->source_hash;
} else if (type == INTEL_SNAPSHOT_DRAW && cmd_buffer->state.gfx.base.pipeline) { } else if (type == INTEL_SNAPSHOT_DRAW && cmd_buffer->state.gfx.base.pipeline) {
const struct anv_graphics_pipeline *pipeline = const struct anv_graphics_pipeline *pipeline =
anv_pipeline_to_graphics(cmd_buffer->state.gfx.base.pipeline); anv_pipeline_to_graphics(cmd_buffer->state.gfx.base.pipeline);
snapshot->vs = pipeline->base.source_hashes[MESA_SHADER_VERTEX]; #define SHADER_SOURCE_HASH(_name) \
snapshot->tcs = pipeline->base.source_hashes[MESA_SHADER_TESS_CTRL]; (pipeline->base.shaders[MESA_SHADER_##VERTEX] ? \
snapshot->tes = pipeline->base.source_hashes[MESA_SHADER_TESS_EVAL]; pipeline->base.shaders[MESA_SHADER_##VERTEX]->prog_data->source_hash : 0)
snapshot->gs = pipeline->base.source_hashes[MESA_SHADER_GEOMETRY]; snapshot->vs = SHADER_SOURCE_HASH(VERTEX);
snapshot->fs = pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]; snapshot->tcs = SHADER_SOURCE_HASH(TESS_CTRL);
snapshot->ms = pipeline->base.source_hashes[MESA_SHADER_MESH]; snapshot->tes = SHADER_SOURCE_HASH(TESS_EVAL);
snapshot->ts = pipeline->base.source_hashes[MESA_SHADER_TASK]; snapshot->gs = SHADER_SOURCE_HASH(GEOMETRY);
snapshot->fs = SHADER_SOURCE_HASH(FRAGMENT);
snapshot->ms = SHADER_SOURCE_HASH(MESH);
snapshot->ts = SHADER_SOURCE_HASH(TASK);
#undef SHADER_SOURCE_HASH
} }
} }
@ -219,18 +223,22 @@ state_changed(struct anv_cmd_buffer *cmd_buffer,
const struct anv_compute_pipeline *cs_pipe = const struct anv_compute_pipeline *cs_pipe =
anv_pipeline_to_compute(cmd_buffer->state.compute.base.pipeline); anv_pipeline_to_compute(cmd_buffer->state.compute.base.pipeline);
assert(cs_pipe); assert(cs_pipe);
cs = cs_pipe->source_hash; cs = cs_pipe->cs->prog_data->source_hash;
} else if (type == INTEL_SNAPSHOT_DRAW) { } else if (type == INTEL_SNAPSHOT_DRAW) {
const struct anv_graphics_pipeline *gfx = const struct anv_graphics_pipeline *gfx =
anv_pipeline_to_graphics(cmd_buffer->state.gfx.base.pipeline); anv_pipeline_to_graphics(cmd_buffer->state.gfx.base.pipeline);
assert(gfx); assert(gfx);
vs = gfx->base.source_hashes[MESA_SHADER_VERTEX]; #define SHADER_SOURCE_HASH(_name) \
tcs = gfx->base.source_hashes[MESA_SHADER_TESS_CTRL]; (gfx->base.shaders[MESA_SHADER_##VERTEX] ? \
tes = gfx->base.source_hashes[MESA_SHADER_TESS_EVAL]; gfx->base.shaders[MESA_SHADER_##VERTEX]->prog_data->source_hash : 0)
gs = gfx->base.source_hashes[MESA_SHADER_GEOMETRY]; vs = SHADER_SOURCE_HASH(VERTEX);
fs = gfx->base.source_hashes[MESA_SHADER_FRAGMENT]; tcs = SHADER_SOURCE_HASH(TESS_CTRL);
ms = gfx->base.source_hashes[MESA_SHADER_MESH]; tes = SHADER_SOURCE_HASH(TESS_EVAL);
ts = gfx->base.source_hashes[MESA_SHADER_TASK]; gs = SHADER_SOURCE_HASH(GEOMETRY);
fs = SHADER_SOURCE_HASH(FRAGMENT);
ms = SHADER_SOURCE_HASH(MESH);
ts = SHADER_SOURCE_HASH(TASK);
#undef SHADER_SOURCE_HASH
} }
/* else blorp, all programs NULL */ /* else blorp, all programs NULL */

View file

@ -1871,7 +1871,6 @@ anv_graphics_pipeline_load_cached_shaders(struct anv_graphics_base_pipeline *pip
stages[s].bin = stages[s].imported.bin; stages[s].bin = stages[s].imported.bin;
pipeline->shaders[s] = anv_shader_bin_ref(stages[s].imported.bin); pipeline->shaders[s] = anv_shader_bin_ref(stages[s].imported.bin);
pipeline->source_hashes[s] = stages[s].source_hash;
imported++; imported++;
} }
} }
@ -1892,7 +1891,6 @@ anv_graphics_pipeline_load_cached_shaders(struct anv_graphics_base_pipeline *pip
*/ */
if (stages[s].imported.bin == NULL || link_optimize) if (stages[s].imported.bin == NULL || link_optimize)
anv_pipeline_add_executables(&pipeline->base, &stages[s]); anv_pipeline_add_executables(&pipeline->base, &stages[s]);
pipeline->source_hashes[s] = stages[s].source_hash;
} }
return true; return true;
} else if (found > 0) { } else if (found > 0) {
@ -2446,7 +2444,6 @@ anv_graphics_pipeline_compile(struct anv_graphics_base_pipeline *pipeline,
} }
anv_pipeline_add_executables(&pipeline->base, stage); anv_pipeline_add_executables(&pipeline->base, stage);
pipeline->source_hashes[s] = stage->source_hash;
pipeline->shaders[s] = stage->bin; pipeline->shaders[s] = stage->bin;
ralloc_free(stage_ctx); ralloc_free(stage_ctx);
@ -2471,7 +2468,6 @@ anv_graphics_pipeline_compile(struct anv_graphics_base_pipeline *pipeline,
struct anv_pipeline_stage *stage = &stages[s]; struct anv_pipeline_stage *stage = &stages[s];
pipeline->source_hashes[s] = stage->source_hash;
pipeline->shaders[s] = anv_shader_bin_ref(stage->imported.bin); pipeline->shaders[s] = anv_shader_bin_ref(stage->imported.bin);
} }
@ -2638,7 +2634,6 @@ anv_pipeline_compile_cs(struct anv_compute_pipeline *pipeline,
anv_pipeline_account_shader(&pipeline->base, stage.bin); anv_pipeline_account_shader(&pipeline->base, stage.bin);
anv_pipeline_add_executables(&pipeline->base, &stage); anv_pipeline_add_executables(&pipeline->base, &stage);
pipeline->source_hash = stage.source_hash;
ralloc_free(mem_ctx); ralloc_free(mem_ctx);
@ -2795,6 +2790,7 @@ anv_graphics_pipeline_emit(struct anv_graphics_pipeline *pipeline,
if (anv_pipeline_is_primitive(pipeline)) { if (anv_pipeline_is_primitive(pipeline)) {
const struct brw_vs_prog_data *vs_prog_data = get_vs_prog_data(pipeline); const struct brw_vs_prog_data *vs_prog_data = get_vs_prog_data(pipeline);
const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline);
/* The total number of vertex elements we need to program. We might need /* The total number of vertex elements we need to program. We might need
* a couple more to implement some of the draw parameters. * a couple more to implement some of the draw parameters.
@ -2823,6 +2819,9 @@ anv_graphics_pipeline_emit(struct anv_graphics_pipeline *pipeline,
pipeline->instance_multiplier = 1; pipeline->instance_multiplier = 1;
if (pipeline->view_mask && !uses_primitive_replication) if (pipeline->view_mask && !uses_primitive_replication)
pipeline->instance_multiplier = util_bitcount(pipeline->view_mask); pipeline->instance_multiplier = util_bitcount(pipeline->view_mask);
pipeline->vs_source_hash = vs_prog_data->base.base.source_hash;
pipeline->fs_source_hash = wm_prog_data ? wm_prog_data->base.source_hash : 0;
} else { } else {
assert(anv_pipeline_is_mesh(pipeline)); assert(anv_pipeline_is_mesh(pipeline));
/* TODO(mesh): Mesh vs. Multiview with Instancing. */ /* TODO(mesh): Mesh vs. Multiview with Instancing. */
@ -2951,7 +2950,7 @@ anv_graphics_pipeline_import_lib(struct anv_graphics_base_pipeline *pipeline,
/* Always import the shader sha1, this will be used for cache lookup. */ /* Always import the shader sha1, this will be used for cache lookup. */
memcpy(stages[s].shader_sha1, lib->retained_shaders[s].shader_sha1, memcpy(stages[s].shader_sha1, lib->retained_shaders[s].shader_sha1,
sizeof(stages[s].shader_sha1)); sizeof(stages[s].shader_sha1));
stages[s].source_hash = lib->base.source_hashes[s]; stages[s].source_hash = lib->base.shaders[s]->prog_data->source_hash;
stages[s].subgroup_size_type = lib->retained_shaders[s].subgroup_size_type; stages[s].subgroup_size_type = lib->retained_shaders[s].subgroup_size_type;
stages[s].imported.nir = lib->retained_shaders[s].nir; stages[s].imported.nir = lib->retained_shaders[s].nir;
@ -4359,10 +4358,11 @@ VkResult anv_GetPipelineExecutableStatisticsKHR(
vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) { vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
uint32_t hash = pipeline->type == ANV_PIPELINE_COMPUTE ? uint32_t hash = pipeline->type == ANV_PIPELINE_COMPUTE ?
anv_pipeline_to_compute(pipeline)->source_hash : anv_pipeline_to_compute(pipeline)->cs->prog_data->source_hash :
(pipeline->type == ANV_PIPELINE_GRAPHICS_LIB || (pipeline->type == ANV_PIPELINE_GRAPHICS_LIB ||
pipeline->type == ANV_PIPELINE_GRAPHICS) ? pipeline->type == ANV_PIPELINE_GRAPHICS) ?
anv_pipeline_to_graphics_base(pipeline)->source_hashes[exe->stage] : anv_pipeline_to_graphics_base(pipeline)->shaders[
exe->stage]->prog_data->source_hash:
0 /* No source hash for ray tracing */; 0 /* No source hash for ray tracing */;
WRITE_STR(stat->name, "Source hash"); WRITE_STR(stat->name, "Source hash");
WRITE_STR(stat->description, WRITE_STR(stat->description,

View file

@ -4819,11 +4819,6 @@ struct anv_graphics_base_pipeline {
/* Shaders */ /* Shaders */
struct anv_shader_bin * shaders[ANV_GRAPHICS_SHADER_STAGE_COUNT]; struct anv_shader_bin * shaders[ANV_GRAPHICS_SHADER_STAGE_COUNT];
/* A small hash based of shader_info::source_sha1 for identifying
* shaders in renderdoc/shader-db.
*/
uint32_t source_hashes[ANV_GRAPHICS_SHADER_STAGE_COUNT];
/* Feedback index in /* Feedback index in
* VkPipelineCreationFeedbackCreateInfo::pPipelineStageCreationFeedbacks * VkPipelineCreationFeedbackCreateInfo::pPipelineStageCreationFeedbacks
* *
@ -4891,6 +4886,9 @@ struct anv_gfx_state_ptr {
struct anv_graphics_pipeline { struct anv_graphics_pipeline {
struct anv_graphics_base_pipeline base; struct anv_graphics_base_pipeline base;
uint32_t vs_source_hash;
uint32_t fs_source_hash;
struct vk_vertex_input_state vertex_input; struct vk_vertex_input_state vertex_input;
struct vk_sample_locations_state sample_locations; struct vk_sample_locations_state sample_locations;
struct vk_dynamic_graphics_state dynamic_state; struct vk_dynamic_graphics_state dynamic_state;
@ -5039,11 +5037,6 @@ struct anv_compute_pipeline {
uint32_t compute_walker[40]; uint32_t compute_walker[40];
} gfx125; } gfx125;
}; };
/* A small hash based of shader_info::source_sha1 for identifying shaders
* in renderdoc/shader-db.
*/
uint32_t source_hash;
}; };
struct anv_rt_shader_group { struct anv_rt_shader_group {

View file

@ -75,36 +75,38 @@ end_debug_marker(VkCommandBuffer commandBuffer)
struct anv_cmd_compute_state *comp_state = &cmd_buffer->state.compute; struct anv_cmd_compute_state *comp_state = &cmd_buffer->state.compute;
struct anv_compute_pipeline *pipeline = struct anv_compute_pipeline *pipeline =
anv_pipeline_to_compute(comp_state->base.pipeline); anv_pipeline_to_compute(comp_state->base.pipeline);
const struct brw_cs_prog_data *cs_prog_data =
brw_cs_prog_data_const(pipeline->cs->prog_data);
cmd_buffer->state.rt.debug_marker_count--; cmd_buffer->state.rt.debug_marker_count--;
switch (cmd_buffer->state.rt.debug_markers[cmd_buffer->state.rt.debug_marker_count]) { switch (cmd_buffer->state.rt.debug_markers[cmd_buffer->state.rt.debug_marker_count]) {
case VK_ACCELERATION_STRUCTURE_BUILD_STEP_TOP: case VK_ACCELERATION_STRUCTURE_BUILD_STEP_TOP:
trace_intel_end_as_build(&cmd_buffer->trace, trace_intel_end_as_build(&cmd_buffer->trace,
pipeline->source_hash); cs_prog_data->base.source_hash);
break; break;
case VK_ACCELERATION_STRUCTURE_BUILD_STEP_BUILD_LEAVES: case VK_ACCELERATION_STRUCTURE_BUILD_STEP_BUILD_LEAVES:
trace_intel_end_as_build_leaves(&cmd_buffer->trace, trace_intel_end_as_build_leaves(&cmd_buffer->trace,
pipeline->source_hash); cs_prog_data->base.source_hash);
break; break;
case VK_ACCELERATION_STRUCTURE_BUILD_STEP_MORTON_GENERATE: case VK_ACCELERATION_STRUCTURE_BUILD_STEP_MORTON_GENERATE:
trace_intel_end_as_morton_generate(&cmd_buffer->trace, trace_intel_end_as_morton_generate(&cmd_buffer->trace,
pipeline->source_hash); cs_prog_data->base.source_hash);
break; break;
case VK_ACCELERATION_STRUCTURE_BUILD_STEP_MORTON_SORT: case VK_ACCELERATION_STRUCTURE_BUILD_STEP_MORTON_SORT:
trace_intel_end_as_morton_sort(&cmd_buffer->trace, trace_intel_end_as_morton_sort(&cmd_buffer->trace,
pipeline->source_hash); cs_prog_data->base.source_hash);
break; break;
case VK_ACCELERATION_STRUCTURE_BUILD_STEP_LBVH_BUILD_INTERNAL: case VK_ACCELERATION_STRUCTURE_BUILD_STEP_LBVH_BUILD_INTERNAL:
trace_intel_end_as_lbvh_build_internal(&cmd_buffer->trace, trace_intel_end_as_lbvh_build_internal(&cmd_buffer->trace,
pipeline->source_hash); cs_prog_data->base.source_hash);
break; break;
case VK_ACCELERATION_STRUCTURE_BUILD_STEP_PLOC_BUILD_INTERNAL: case VK_ACCELERATION_STRUCTURE_BUILD_STEP_PLOC_BUILD_INTERNAL:
trace_intel_end_as_ploc_build_internal(&cmd_buffer->trace, trace_intel_end_as_ploc_build_internal(&cmd_buffer->trace,
pipeline->source_hash); cs_prog_data->base.source_hash);
break; break;
case VK_ACCELERATION_STRUCTURE_BUILD_STEP_ENCODE: case VK_ACCELERATION_STRUCTURE_BUILD_STEP_ENCODE:
trace_intel_end_as_encode(&cmd_buffer->trace, trace_intel_end_as_encode(&cmd_buffer->trace,
pipeline->source_hash); cs_prog_data->base.source_hash);
break; break;
default: default:
unreachable("Invalid build step"); unreachable("Invalid build step");
@ -726,6 +728,8 @@ genX(CmdCopyAccelerationStructureKHR)(
ANV_FROM_HANDLE(anv_pipeline, anv_pipeline, pipeline); ANV_FROM_HANDLE(anv_pipeline, anv_pipeline, pipeline);
struct anv_compute_pipeline *compute_pipeline = struct anv_compute_pipeline *compute_pipeline =
anv_pipeline_to_compute(anv_pipeline); anv_pipeline_to_compute(anv_pipeline);
const struct brw_cs_prog_data *cs_prog_data =
brw_cs_prog_data_const(compute_pipeline->cs->prog_data);
struct anv_cmd_saved_state saved; struct anv_cmd_saved_state saved;
anv_cmd_buffer_save_state(cmd_buffer, anv_cmd_buffer_save_state(cmd_buffer,
@ -770,7 +774,7 @@ genX(CmdCopyAccelerationStructureKHR)(
anv_cmd_buffer_restore_state(cmd_buffer, &saved); anv_cmd_buffer_restore_state(cmd_buffer, &saved);
trace_intel_end_as_copy(&cmd_buffer->trace, trace_intel_end_as_copy(&cmd_buffer->trace,
compute_pipeline->source_hash); cs_prog_data->base.source_hash);
} }
void void
@ -798,6 +802,8 @@ genX(CmdCopyAccelerationStructureToMemoryKHR)(
ANV_FROM_HANDLE(anv_pipeline, anv_pipeline, pipeline); ANV_FROM_HANDLE(anv_pipeline, anv_pipeline, pipeline);
struct anv_compute_pipeline *compute_pipeline = struct anv_compute_pipeline *compute_pipeline =
anv_pipeline_to_compute(anv_pipeline); anv_pipeline_to_compute(anv_pipeline);
const struct brw_cs_prog_data *cs_prog_data =
brw_cs_prog_data_const(compute_pipeline->cs->prog_data);
struct anv_cmd_saved_state saved; struct anv_cmd_saved_state saved;
anv_cmd_buffer_save_state(cmd_buffer, anv_cmd_buffer_save_state(cmd_buffer,
@ -846,7 +852,7 @@ genX(CmdCopyAccelerationStructureToMemoryKHR)(
anv_cmd_buffer_restore_state(cmd_buffer, &saved); anv_cmd_buffer_restore_state(cmd_buffer, &saved);
trace_intel_end_as_copy(&cmd_buffer->trace, trace_intel_end_as_copy(&cmd_buffer->trace,
compute_pipeline->source_hash); cs_prog_data->base.source_hash);
} }
void void
@ -873,6 +879,8 @@ genX(CmdCopyMemoryToAccelerationStructureKHR)(
ANV_FROM_HANDLE(anv_pipeline, anv_pipeline, pipeline); ANV_FROM_HANDLE(anv_pipeline, anv_pipeline, pipeline);
struct anv_compute_pipeline *compute_pipeline = struct anv_compute_pipeline *compute_pipeline =
anv_pipeline_to_compute(anv_pipeline); anv_pipeline_to_compute(anv_pipeline);
const struct brw_cs_prog_data *cs_prog_data =
brw_cs_prog_data_const(compute_pipeline->cs->prog_data);
struct anv_cmd_saved_state saved; struct anv_cmd_saved_state saved;
anv_cmd_buffer_save_state(cmd_buffer, anv_cmd_buffer_save_state(cmd_buffer,
@ -904,7 +912,7 @@ genX(CmdCopyMemoryToAccelerationStructureKHR)(
anv_cmd_buffer_restore_state(cmd_buffer, &saved); anv_cmd_buffer_restore_state(cmd_buffer, &saved);
trace_intel_end_as_copy(&cmd_buffer->trace, trace_intel_end_as_copy(&cmd_buffer->trace,
compute_pipeline->source_hash); cs_prog_data->base.source_hash);
} }
void void

View file

@ -642,7 +642,7 @@ void genX(CmdDispatchBase)(
if (cmd_buffer->state.rt.debug_marker_count == 0) { if (cmd_buffer->state.rt.debug_marker_count == 0) {
trace_intel_end_compute(&cmd_buffer->trace, trace_intel_end_compute(&cmd_buffer->trace,
groupCountX, groupCountY, groupCountZ, groupCountX, groupCountY, groupCountZ,
pipeline->source_hash); prog_data->base.source_hash);
} }
} }
@ -703,7 +703,7 @@ emit_unaligned_cs_walker(
if (cmd_buffer->state.rt.debug_marker_count == 0) { if (cmd_buffer->state.rt.debug_marker_count == 0) {
trace_intel_end_compute(&cmd_buffer->trace, trace_intel_end_compute(&cmd_buffer->trace,
groupCountX, groupCountY, groupCountZ, groupCountX, groupCountY, groupCountZ,
pipeline->source_hash); prog_data->base.source_hash);
} }
} }
@ -809,7 +809,7 @@ genX(cmd_buffer_dispatch_indirect)(struct anv_cmd_buffer *cmd_buffer,
if (cmd_buffer->state.rt.debug_marker_count == 0) { if (cmd_buffer->state.rt.debug_marker_count == 0) {
trace_intel_end_compute_indirect(&cmd_buffer->trace, trace_intel_end_compute_indirect(&cmd_buffer->trace,
anv_address_utrace(indirect_addr), anv_address_utrace(indirect_addr),
pipeline->source_hash); prog_data->base.source_hash);
} }
} }

View file

@ -1131,8 +1131,8 @@ void genX(CmdDraw)(
cmd_buffer_post_draw_wa(cmd_buffer, vertexCount, SEQUENTIAL); cmd_buffer_post_draw_wa(cmd_buffer, vertexCount, SEQUENTIAL);
trace_intel_end_draw(&cmd_buffer->trace, count, trace_intel_end_draw(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
void genX(CmdDrawMultiEXT)( void genX(CmdDrawMultiEXT)(
@ -1188,8 +1188,8 @@ void genX(CmdDrawMultiEXT)(
SEQUENTIAL); SEQUENTIAL);
trace_intel_end_draw_multi(&cmd_buffer->trace, count, trace_intel_end_draw_multi(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
#else #else
vk_foreach_multi_draw(draw, i, pVertexInfo, drawCount, stride) { vk_foreach_multi_draw(draw, i, pVertexInfo, drawCount, stride) {
@ -1224,8 +1224,8 @@ void genX(CmdDrawMultiEXT)(
SEQUENTIAL); SEQUENTIAL);
trace_intel_end_draw_multi(&cmd_buffer->trace, count, trace_intel_end_draw_multi(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
#endif #endif
} }
@ -1296,8 +1296,8 @@ void genX(CmdDrawIndexed)(
cmd_buffer_post_draw_wa(cmd_buffer, indexCount, RANDOM); cmd_buffer_post_draw_wa(cmd_buffer, indexCount, RANDOM);
trace_intel_end_draw_indexed(&cmd_buffer->trace, count, trace_intel_end_draw_indexed(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
void genX(CmdDrawMultiIndexedEXT)( void genX(CmdDrawMultiIndexedEXT)(
@ -1369,8 +1369,8 @@ void genX(CmdDrawMultiIndexedEXT)(
RANDOM); RANDOM);
trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count, trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
emitted = false; emitted = false;
} }
} else { } else {
@ -1409,8 +1409,8 @@ void genX(CmdDrawMultiIndexedEXT)(
RANDOM); RANDOM);
trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count, trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
} }
} else { } else {
@ -1445,8 +1445,8 @@ void genX(CmdDrawMultiIndexedEXT)(
RANDOM); RANDOM);
trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count, trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
} }
#else #else
@ -1484,8 +1484,8 @@ void genX(CmdDrawMultiIndexedEXT)(
RANDOM); RANDOM);
trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count, trace_intel_end_draw_indexed_multi(&cmd_buffer->trace, count,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
#endif #endif
} }
@ -1606,8 +1606,8 @@ void genX(CmdDrawIndirectByteCountEXT)(
trace_intel_end_draw_indirect_byte_count(&cmd_buffer->trace, trace_intel_end_draw_indirect_byte_count(&cmd_buffer->trace,
instanceCount * pipeline->instance_multiplier, instanceCount * pipeline->instance_multiplier,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
static void static void
@ -1941,8 +1941,8 @@ void genX(CmdDrawIndirect)(
} }
trace_intel_end_draw_indirect(&cmd_buffer->trace, drawCount, trace_intel_end_draw_indirect(&cmd_buffer->trace, drawCount,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
void genX(CmdDrawIndexedIndirect)( void genX(CmdDrawIndexedIndirect)(
@ -1994,8 +1994,8 @@ void genX(CmdDrawIndexedIndirect)(
} }
trace_intel_end_draw_indexed_indirect(&cmd_buffer->trace, drawCount, trace_intel_end_draw_indexed_indirect(&cmd_buffer->trace, drawCount,
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
#define MI_PREDICATE_SRC0 0x2400 #define MI_PREDICATE_SRC0 0x2400
@ -2203,8 +2203,8 @@ void genX(CmdDrawIndirectCount)(
trace_intel_end_draw_indirect_count(&cmd_buffer->trace, trace_intel_end_draw_indirect_count(&cmd_buffer->trace,
anv_address_utrace(count_address), anv_address_utrace(count_address),
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
void genX(CmdDrawIndexedIndirectCount)( void genX(CmdDrawIndexedIndirectCount)(
@ -2264,9 +2264,8 @@ void genX(CmdDrawIndexedIndirectCount)(
trace_intel_end_draw_indexed_indirect_count(&cmd_buffer->trace, trace_intel_end_draw_indexed_indirect_count(&cmd_buffer->trace,
anv_address_utrace(count_address), anv_address_utrace(count_address),
pipeline->base.source_hashes[MESA_SHADER_VERTEX], pipeline->vs_source_hash,
pipeline->base.source_hashes[MESA_SHADER_FRAGMENT]); pipeline->fs_source_hash);
} }
void genX(CmdBeginTransformFeedbackEXT)( void genX(CmdBeginTransformFeedbackEXT)(