mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
radv: fix emitting NGG culling state for ESO
It's possible to enable NGG culling with ESO if shaders are linked, or
if the VS doesn't need a prolog or if TES is used. This wasn't
supposed to be enabled but I think it worked just by luck because the
user SGPR value was probably zero and NGGC was disabled at draw time.
Found by inspection.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31829>
(cherry picked from commit 62efebfd70)
This commit is contained in:
parent
0837800452
commit
1701837c16
2 changed files with 4 additions and 3 deletions
|
|
@ -904,7 +904,7 @@
|
|||
"description": "radv: fix emitting NGG culling state for ESO",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -10751,7 +10751,7 @@ radv_emit_all_graphics_states(struct radv_cmd_buffer *cmd_buffer, const struct r
|
|||
(cmd_buffer->state.dirty_dynamic & (RADV_DYNAMIC_RASTERIZATION_SAMPLES | RADV_DYNAMIC_PRIMITIVE_TOPOLOGY)))
|
||||
radv_flush_occlusion_query_state(cmd_buffer);
|
||||
|
||||
if (((cmd_buffer->state.dirty & RADV_CMD_DIRTY_PIPELINE) ||
|
||||
if (((cmd_buffer->state.dirty & (RADV_CMD_DIRTY_PIPELINE | RADV_CMD_DIRTY_GRAPHICS_SHADERS)) ||
|
||||
(cmd_buffer->state.dirty_dynamic &
|
||||
(RADV_DYNAMIC_CULL_MODE | RADV_DYNAMIC_FRONT_FACE | RADV_DYNAMIC_RASTERIZER_DISCARD_ENABLE |
|
||||
RADV_DYNAMIC_VIEWPORT | RADV_DYNAMIC_CONSERVATIVE_RAST_MODE | RADV_DYNAMIC_RASTERIZATION_SAMPLES |
|
||||
|
|
@ -10873,6 +10873,8 @@ radv_bind_graphics_shaders(struct radv_cmd_buffer *cmd_buffer)
|
|||
|
||||
cmd_buffer->state.last_vgt_shader = cmd_buffer->state.shaders[last_vgt_api_stage];
|
||||
|
||||
cmd_buffer->state.has_nggc = cmd_buffer->state.last_vgt_shader->info.has_ngg_culling;
|
||||
|
||||
struct radv_shader *gs_copy_shader = cmd_buffer->state.shader_objs[MESA_SHADER_GEOMETRY]
|
||||
? cmd_buffer->state.shader_objs[MESA_SHADER_GEOMETRY]->gs.copy_shader
|
||||
: NULL;
|
||||
|
|
@ -13670,7 +13672,6 @@ radv_reset_pipeline_state(struct radv_cmd_buffer *cmd_buffer, VkPipelineBindPoin
|
|||
|
||||
cmd_buffer->state.gs_copy_shader = NULL;
|
||||
cmd_buffer->state.last_vgt_shader = NULL;
|
||||
cmd_buffer->state.has_nggc = false;
|
||||
cmd_buffer->state.emitted_vs_prolog = NULL;
|
||||
cmd_buffer->state.spi_shader_col_format = 0;
|
||||
cmd_buffer->state.cb_shader_mask = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue