radv: use last_vgt_api_stage for determining the last stage with XFB
It's shorter and cleaner. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21237>
This commit is contained in:

committed by
Marge Bot

parent
36d8443e5f
commit
d05a02018b
@@ -2455,15 +2455,9 @@ radv_fill_shader_info_ngg(struct radv_graphics_pipeline *pipeline,
|
|||||||
stages[MESA_SHADER_TESS_EVAL].info.is_ngg = false;
|
stages[MESA_SHADER_TESS_EVAL].info.is_ngg = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_shader_stage last_xfb_stage = MESA_SHADER_VERTEX;
|
bool uses_xfb = pipeline->last_vgt_api_stage != MESA_SHADER_NONE &&
|
||||||
|
stages[pipeline->last_vgt_api_stage].nir &&
|
||||||
for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {
|
stages[pipeline->last_vgt_api_stage].nir->xfb_info;
|
||||||
if (stages[i].nir)
|
|
||||||
last_xfb_stage = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool uses_xfb = stages[last_xfb_stage].nir &&
|
|
||||||
stages[last_xfb_stage].nir->xfb_info;
|
|
||||||
|
|
||||||
if (!device->physical_device->use_ngg_streamout && uses_xfb) {
|
if (!device->physical_device->use_ngg_streamout && uses_xfb) {
|
||||||
/* GFX11+ requires NGG. */
|
/* GFX11+ requires NGG. */
|
||||||
|
Reference in New Issue
Block a user