mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
radeonsi: try to fix Navi14 regression in debug builds
Assertion failure:
../src/gallium/drivers/radeonsi/si_state_shaders.cpp:1369: unsigned int si_get_input_prim(const
si_shader_selector*, const si_shader_key*, bool): Assertion `gs->stage == MESA_SHADER_VERTEX' failed.
Fixes: 7e959864b2 ("radeonsi: enable NGG culling for non-monolithic TES and GS")
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
This commit is contained in:
parent
a3c293cdcd
commit
ed372d4b7c
1 changed files with 7 additions and 2 deletions
|
|
@ -1154,14 +1154,19 @@ static inline bool si_shader_uses_discard(struct si_shader *shader)
|
|||
|
||||
static inline bool si_shader_culling_enabled(struct si_shader *shader)
|
||||
{
|
||||
/* Legacy VS/TES/GS and ES don't cull in the shader. */
|
||||
if (!shader->key.ge.as_ngg || shader->key.ge.as_es) {
|
||||
assert(!shader->key.ge.opt.ngg_culling);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (shader->key.ge.opt.ngg_culling)
|
||||
return true;
|
||||
|
||||
unsigned output_prim = si_get_output_prim_simplified(shader->selector, &shader->key);
|
||||
|
||||
/* This enables NGG culling for non-monolithic TES and GS. */
|
||||
return shader->key.ge.as_ngg && !shader->key.ge.as_es &&
|
||||
shader->selector->ngg_cull_vert_threshold == 0 &&
|
||||
return shader->selector->ngg_cull_vert_threshold == 0 &&
|
||||
(output_prim == MESA_PRIM_TRIANGLES || output_prim == MESA_PRIM_LINES);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue