result = ctx->gs_invocation_id;
break;
case nir_intrinsic_load_primitive_id:
- if (ctx->stage == MESA_SHADER_GEOMETRY)
+ if (ctx->stage == MESA_SHADER_GEOMETRY) {
+ ctx->shader_info->gs.uses_prim_id = true;
result = ctx->gs_prim_id;
- else if (ctx->stage == MESA_SHADER_TESS_CTRL) {
+ } else if (ctx->stage == MESA_SHADER_TESS_CTRL) {
ctx->shader_info->tcs.uses_prim_id = true;
result = ctx->tcs_patch_id;
} else if (ctx->stage == MESA_SHADER_TESS_EVAL) {
partial_es_wave = true;
if (radv_pipeline_has_gs(cmd_buffer->state.pipeline)) {
+
+ if (radv_pipeline_has_gs(cmd_buffer->state.pipeline) &&
+ cmd_buffer->state.pipeline->shaders[MESA_SHADER_GEOMETRY]->info.gs.uses_prim_id)
+ ia_switch_on_eoi = true;
+
/* GS requirement. */
if (SI_GS_PER_ES / primgroup_size >= cmd_buffer->device->gs_table_depth - 3)
partial_es_wave = true;