radv: force TCS stage for VS as LS compiled separately on GFX9+

When VS as LS is compiled separately on GFX9+, the stage/previous_stage
must be VERTEX/TESS_CTRL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27336>
This commit is contained in:
Samuel Pitoiset
2024-01-29 14:05:58 +01:00
parent 3d5d163693
commit 542b9aaf18
2 changed files with 15 additions and 0 deletions

View File

@@ -1580,6 +1580,13 @@ radv_postprocess_binary_config(struct radv_device *device, struct radv_shader_bi
config->rsrc2 |= S_00B22C_USER_SGPR_MSB_GFX9(args->num_user_sgprs >> 5);
}
if (info->merged_shader_compiled_separately) {
/* Update the stage for merged shaders compiled separately with ESO on GFX9+. */
if (stage == MESA_SHADER_VERTEX && info->vs.as_ls) {
stage = MESA_SHADER_TESS_CTRL;
}
}
bool wgp_mode = radv_should_use_wgp_mode(device, stage, info);
switch (stage) {

View File

@@ -456,6 +456,14 @@ declare_shader_args(const struct radv_device *device, const struct radv_graphics
stage = MESA_SHADER_GEOMETRY;
}
if (info->merged_shader_compiled_separately) {
/* Update the stage for merged shaders compiled separately with ESO on GFX9+. */
if (stage == MESA_SHADER_VERTEX && info->vs.as_ls) {
previous_stage = MESA_SHADER_VERTEX;
stage = MESA_SHADER_TESS_CTRL;
}
}
radv_init_shader_args(device, stage, args);
if (gl_shader_stage_is_rt(stage)) {