mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
radeonsi: set VS dirty bit from si_vs_key_update_inputs
Since it has to be done for every caller we might as well do it from a single place. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37882>
This commit is contained in:
parent
d3f8571e84
commit
091f18ea57
3 changed files with 6 additions and 12 deletions
|
|
@ -4684,10 +4684,8 @@ static void si_bind_vertex_elements(struct pipe_context *ctx, void *state)
|
|||
* src_offset alignment, which is reflected in fix_fetch_opencode. */
|
||||
old->fix_fetch_opencode != v->fix_fetch_opencode ||
|
||||
memcmp(old->fix_fetch, v->fix_fetch, sizeof(v->fix_fetch[0]) *
|
||||
MAX2(old->count, v->count))) {
|
||||
MAX2(old->count, v->count)))
|
||||
si_vs_key_update_inputs(sctx);
|
||||
sctx->dirty_shaders_mask |= BITFIELD_BIT(MESA_SHADER_VERTEX);
|
||||
}
|
||||
|
||||
if (v->instance_divisor_is_fetched) {
|
||||
struct pipe_constant_buffer cb;
|
||||
|
|
@ -4763,10 +4761,8 @@ static void si_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
|
|||
* whether buffers are at least dword-aligned, since that should always
|
||||
* be the case in well-behaved applications anyway.
|
||||
*/
|
||||
if (sctx->vertex_elements->vb_alignment_check_mask & unaligned) {
|
||||
if (sctx->vertex_elements->vb_alignment_check_mask & unaligned)
|
||||
si_vs_key_update_inputs(sctx);
|
||||
sctx->dirty_shaders_mask |= BITFIELD_BIT(MESA_SHADER_VERTEX);
|
||||
}
|
||||
}
|
||||
|
||||
static struct pipe_vertex_state *
|
||||
|
|
|
|||
|
|
@ -2259,20 +2259,16 @@ static void si_draw(struct pipe_context *ctx,
|
|||
sctx->force_trivial_vs_inputs = true;
|
||||
|
||||
/* Update shaders to disable VS input lowering. */
|
||||
if (sctx->uses_nontrivial_vs_inputs) {
|
||||
if (sctx->uses_nontrivial_vs_inputs)
|
||||
si_vs_key_update_inputs(sctx);
|
||||
sctx->dirty_shaders_mask |= BITFIELD_BIT(MESA_SHADER_VERTEX);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (sctx->force_trivial_vs_inputs) {
|
||||
sctx->force_trivial_vs_inputs = false;
|
||||
|
||||
/* Update shaders to possibly enable VS input lowering. */
|
||||
if (sctx->uses_nontrivial_vs_inputs) {
|
||||
if (sctx->uses_nontrivial_vs_inputs)
|
||||
si_vs_key_update_inputs(sctx);
|
||||
sctx->dirty_shaders_mask |= BITFIELD_BIT(MESA_SHADER_VERTEX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2426,6 +2426,8 @@ void si_vs_key_update_inputs(struct si_context *sctx)
|
|||
*/
|
||||
if (uses_nontrivial_vs_inputs && sctx->force_trivial_vs_inputs)
|
||||
si_clear_vs_key_inputs(key);
|
||||
|
||||
sctx->dirty_shaders_mask |= BITFIELD_BIT(MESA_SHADER_VERTEX);
|
||||
}
|
||||
|
||||
static void si_get_vs_key_inputs(struct si_context *sctx, union si_shader_key *key)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue