radeonsi: don't invalidate emitted NUM_INSTANCES for u_blitter
invalidate_draw_sh_constants should invalidate only SGPRs. invalidate_draw_constants invalidates SGPRs and NUM_INSTANCES. u_blitter called invalidate_draw_sh_constants, which previously invalidated NUM_INSTANCES as well. This commit fixes that. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
This commit is contained in:
@@ -536,7 +536,7 @@ void si_begin_new_gfx_cs(struct si_context *ctx, bool first_cs)
|
||||
|
||||
/* Invalidate various draw states so that they are emitted before
|
||||
* the first draw call. */
|
||||
si_invalidate_draw_sh_constants(ctx);
|
||||
si_invalidate_draw_constants(ctx);
|
||||
ctx->last_index_size = -1;
|
||||
ctx->last_primitive_restart_en = -1;
|
||||
ctx->last_restart_index = SI_RESTART_INDEX_UNKNOWN;
|
||||
|
||||
@@ -1634,6 +1634,11 @@ static inline void si_context_add_resource_size(struct si_context *sctx, struct
|
||||
static inline void si_invalidate_draw_sh_constants(struct si_context *sctx)
|
||||
{
|
||||
sctx->last_base_vertex = SI_BASE_VERTEX_UNKNOWN;
|
||||
}
|
||||
|
||||
static inline void si_invalidate_draw_constants(struct si_context *sctx)
|
||||
{
|
||||
si_invalidate_draw_sh_constants(sctx);
|
||||
sctx->last_instance_count = SI_INSTANCE_COUNT_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
@@ -901,7 +901,7 @@ static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw
|
||||
|
||||
assert(indirect_va % 8 == 0);
|
||||
|
||||
si_invalidate_draw_sh_constants(sctx);
|
||||
si_invalidate_draw_constants(sctx);
|
||||
|
||||
radeon_emit(cs, PKT3(PKT3_SET_BASE, 2, 0));
|
||||
radeon_emit(cs, 1);
|
||||
|
||||
Reference in New Issue
Block a user