mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 20:30:25 +01:00
radv: add a new dirty bit for the blend constants state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36901>
This commit is contained in:
parent
1be9cd43a8
commit
dc3371332e
2 changed files with 11 additions and 5 deletions
|
|
@ -3343,7 +3343,7 @@ radv_emit_scissor(struct radv_cmd_buffer *cmd_buffer)
|
|||
}
|
||||
|
||||
static void
|
||||
radv_emit_blend_constants(struct radv_cmd_buffer *cmd_buffer)
|
||||
radv_emit_blend_constants_state(struct radv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic;
|
||||
struct radv_cmd_stream *cs = cmd_buffer->cs;
|
||||
|
|
@ -3352,6 +3352,8 @@ radv_emit_blend_constants(struct radv_cmd_buffer *cmd_buffer)
|
|||
radeon_set_context_reg_seq(R_028414_CB_BLEND_RED, 4);
|
||||
radeon_emit_array((uint32_t *)d->vk.cb.blend_constants, 4);
|
||||
radeon_end();
|
||||
|
||||
cmd_buffer->state.dirty &= ~RADV_CMD_DIRTY_BLEND_CONSTANTS_STATE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -5386,9 +5388,6 @@ radv_cmd_buffer_flush_dynamic_state(struct radv_cmd_buffer *cmd_buffer, const ui
|
|||
if (states & (RADV_DYNAMIC_SCISSOR | RADV_DYNAMIC_VIEWPORT) && !pdev->info.has_gfx9_scissor_bug)
|
||||
radv_emit_scissor(cmd_buffer);
|
||||
|
||||
if (states & RADV_DYNAMIC_BLEND_CONSTANTS)
|
||||
radv_emit_blend_constants(cmd_buffer);
|
||||
|
||||
if (states & (RADV_DYNAMIC_SAMPLE_LOCATIONS | RADV_DYNAMIC_SAMPLE_LOCATIONS_ENABLE))
|
||||
radv_emit_sample_locations(cmd_buffer);
|
||||
|
||||
|
|
@ -11464,6 +11463,9 @@ radv_validate_dynamic_states(struct radv_cmd_buffer *cmd_buffer, uint64_t dynami
|
|||
|
||||
if (dynamic_states & RADV_DYNAMIC_VERTEX_INPUT)
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_VS_PROLOG_STATE;
|
||||
|
||||
if (dynamic_states & RADV_DYNAMIC_BLEND_CONSTANTS)
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_BLEND_CONSTANTS_STATE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -11577,6 +11579,9 @@ radv_emit_all_graphics_states(struct radv_cmd_buffer *cmd_buffer, const struct r
|
|||
if (cmd_buffer->state.dirty & RADV_CMD_DIRTY_DEPTH_STENCIL_STATE)
|
||||
radv_emit_depth_stencil_state(cmd_buffer);
|
||||
|
||||
if (cmd_buffer->state.dirty & RADV_CMD_DIRTY_BLEND_CONSTANTS_STATE)
|
||||
radv_emit_blend_constants_state(cmd_buffer);
|
||||
|
||||
if (cmd_buffer->state.dirty & RADV_CMD_DIRTY_CB_RENDER_STATE)
|
||||
radv_emit_cb_render_state(cmd_buffer);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ enum radv_cmd_dirty_bits {
|
|||
RADV_CMD_DIRTY_RAST_SAMPLES_STATE = 1ull << 26,
|
||||
RADV_CMD_DIRTY_DEPTH_BIAS_STATE = 1ull << 27,
|
||||
RADV_CMD_DIRTY_VS_PROLOG_STATE = 1ull << 28,
|
||||
RADV_CMD_DIRTY_ALL = (1ull << 29) - 1,
|
||||
RADV_CMD_DIRTY_BLEND_CONSTANTS_STATE = 1ull << 29,
|
||||
RADV_CMD_DIRTY_ALL = (1ull << 30) - 1,
|
||||
|
||||
RADV_CMD_DIRTY_SHADER_QUERY = RADV_CMD_DIRTY_NGG_STATE | RADV_CMD_DIRTY_TASK_STATE,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue