radv: determine the ES type (VS or TES) for GS earlier
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13170>
This commit is contained in:
@@ -326,11 +326,6 @@ setup_gs_variables(isel_context* ctx, nir_shader* nir)
|
|||||||
ctx->program->config->lds_size =
|
ctx->program->config->lds_size =
|
||||||
DIV_ROUND_UP(nir->info.shared_size, ctx->program->dev.lds_encoding_granule);
|
DIV_ROUND_UP(nir->info.shared_size, ctx->program->dev.lds_encoding_granule);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->stage.has(SWStage::VS))
|
|
||||||
ctx->program->info->gs.es_type = MESA_SHADER_VERTEX;
|
|
||||||
else if (ctx->stage.has(SWStage::TES))
|
|
||||||
ctx->program->info->gs.es_type = MESA_SHADER_TESS_EVAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -2681,13 +2681,6 @@ radv_compile_nir_shader(struct ac_llvm_compiler *ac_llvm, struct radv_shader_bin
|
|||||||
ac_compile_llvm_module(ac_llvm, llvm_module, rbinary, nir[nir_count - 1]->info.stage,
|
ac_compile_llvm_module(ac_llvm, llvm_module, rbinary, nir[nir_count - 1]->info.stage,
|
||||||
radv_get_shader_name(args->shader_info, nir[nir_count - 1]->info.stage),
|
radv_get_shader_name(args->shader_info, nir[nir_count - 1]->info.stage),
|
||||||
args->options);
|
args->options);
|
||||||
|
|
||||||
/* Determine the ES type (VS or TES) for the GS on GFX9. */
|
|
||||||
if (args->options->chip_class >= GFX9) {
|
|
||||||
if (nir_count == 2 && nir[1]->info.stage == MESA_SHADER_GEOMETRY) {
|
|
||||||
args->shader_info->gs.es_type = nir[0]->info.stage;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -2952,6 +2952,7 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
|
|||||||
}
|
}
|
||||||
infos[MESA_SHADER_GEOMETRY].is_ngg = infos[pre_stage].is_ngg;
|
infos[MESA_SHADER_GEOMETRY].is_ngg = infos[pre_stage].is_ngg;
|
||||||
infos[MESA_SHADER_GEOMETRY].is_ngg_passthrough = infos[pre_stage].is_ngg_passthrough;
|
infos[MESA_SHADER_GEOMETRY].is_ngg_passthrough = infos[pre_stage].is_ngg_passthrough;
|
||||||
|
infos[MESA_SHADER_GEOMETRY].gs.es_type = pre_stage;
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
radv_nir_shader_info_pass(pipeline->device, combined_nir[i], pipeline->layout, pipeline_key,
|
radv_nir_shader_info_pass(pipeline->device, combined_nir[i], pipeline->layout, pipeline_key,
|
||||||
|
Reference in New Issue
Block a user