mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 16:18:06 +02:00
radv: save/restore the stencil reference during internal driver operations
I think I should improve this to be more robust.
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6243
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15700>
(cherry picked from commit c439735a91)
Conflicts:
src/gallium/drivers/zink/ci/zink-radv-fails.txt
This commit is contained in:
parent
0c834a0350
commit
1df7411369
3 changed files with 13 additions and 2 deletions
|
|
@ -6020,7 +6020,7 @@
|
|||
"description": "radv: save/restore the stencil reference during internal driver operations",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"because_sha": null
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -121,6 +121,9 @@ radv_meta_save(struct radv_meta_saved_state *state, struct radv_cmd_buffer *cmd_
|
|||
state->stencil_write_mask.front = cmd_buffer->state.dynamic.stencil_write_mask.front;
|
||||
state->stencil_write_mask.back = cmd_buffer->state.dynamic.stencil_write_mask.back;
|
||||
|
||||
state->stencil_reference.front = cmd_buffer->state.dynamic.stencil_reference.front;
|
||||
state->stencil_reference.back = cmd_buffer->state.dynamic.stencil_reference.back;
|
||||
|
||||
state->fragment_shading_rate.size = cmd_buffer->state.dynamic.fragment_shading_rate.size;
|
||||
state->fragment_shading_rate.combiner_ops[0] =
|
||||
cmd_buffer->state.dynamic.fragment_shading_rate.combiner_ops[0];
|
||||
|
|
@ -220,6 +223,9 @@ radv_meta_restore(const struct radv_meta_saved_state *state, struct radv_cmd_buf
|
|||
cmd_buffer->state.dynamic.stencil_write_mask.front = state->stencil_write_mask.front;
|
||||
cmd_buffer->state.dynamic.stencil_write_mask.back = state->stencil_write_mask.back;
|
||||
|
||||
cmd_buffer->state.dynamic.stencil_reference.front = state->stencil_reference.front;
|
||||
cmd_buffer->state.dynamic.stencil_reference.back = state->stencil_reference.back;
|
||||
|
||||
cmd_buffer->state.dynamic.fragment_shading_rate.size = state->fragment_shading_rate.size;
|
||||
cmd_buffer->state.dynamic.fragment_shading_rate.combiner_ops[0] =
|
||||
state->fragment_shading_rate.combiner_ops[0];
|
||||
|
|
@ -243,7 +249,7 @@ radv_meta_restore(const struct radv_meta_saved_state *state, struct radv_cmd_buf
|
|||
RADV_CMD_DIRTY_DYNAMIC_DEPTH_WRITE_ENABLE | RADV_CMD_DIRTY_DYNAMIC_DEPTH_COMPARE_OP |
|
||||
RADV_CMD_DIRTY_DYNAMIC_DEPTH_BOUNDS_TEST_ENABLE |
|
||||
RADV_CMD_DIRTY_DYNAMIC_STENCIL_TEST_ENABLE | RADV_CMD_DIRTY_DYNAMIC_STENCIL_OP |
|
||||
RADV_CMD_DIRTY_DYNAMIC_STENCIL_WRITE_MASK |
|
||||
RADV_CMD_DIRTY_DYNAMIC_STENCIL_WRITE_MASK | RADV_CMD_DIRTY_DYNAMIC_STENCIL_REFERENCE |
|
||||
RADV_CMD_DIRTY_DYNAMIC_FRAGMENT_SHADING_RATE | RADV_CMD_DIRTY_DYNAMIC_DEPTH_BIAS_ENABLE |
|
||||
RADV_CMD_DIRTY_DYNAMIC_PRIMITIVE_RESTART_ENABLE |
|
||||
RADV_CMD_DIRTY_DYNAMIC_RASTERIZER_DISCARD_ENABLE | RADV_CMD_DIRTY_DYNAMIC_LOGIC_OP |
|
||||
|
|
|
|||
|
|
@ -91,6 +91,11 @@ struct radv_meta_saved_state {
|
|||
} back;
|
||||
} stencil_op;
|
||||
|
||||
struct {
|
||||
uint32_t front;
|
||||
uint32_t back;
|
||||
} stencil_reference;
|
||||
|
||||
struct {
|
||||
VkExtent2D size;
|
||||
VkFragmentShadingRateCombinerOpKHR combiner_ops[2];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue