asahi: Track scissor states

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11084>
This commit is contained in:
Alyssa Rosenzweig 2021-05-27 22:51:00 -04:00 committed by Marge Bot
parent 38a9c59377
commit be5ea29237
2 changed files with 11 additions and 2 deletions

View File

@ -407,11 +407,18 @@ agx_set_sample_mask(struct pipe_context *pipe, unsigned sample_mask)
}
static void
agx_set_scissor_states(struct pipe_context *ctx,
agx_set_scissor_states(struct pipe_context *pctx,
unsigned start_slot,
unsigned num_scissors,
const struct pipe_scissor_state *state)
const struct pipe_scissor_state *scissor)
{
struct agx_context *ctx = agx_context(pctx);
assert(start_slot == 0 && "no geometry shaders");
assert(num_scissors == 1 && "no geometry shaders");
ctx->scissor = *scissor;
ctx->dirty |= AGX_DIRTY_SCISSOR;
}
static void

View File

@ -117,6 +117,7 @@ struct asahi_shader_key {
enum agx_dirty {
AGX_DIRTY_VERTEX = BITFIELD_BIT(0),
AGX_DIRTY_VIEWPORT = BITFIELD_BIT(1),
AGX_DIRTY_SCISSOR = BITFIELD_BIT(2),
};
struct agx_context {
@ -136,6 +137,7 @@ struct agx_context {
struct agx_blend *blend;
struct pipe_blend_color blend_color;
struct pipe_viewport_state viewport;
struct pipe_scissor_state scissor;
uint8_t render_target[8][AGX_RENDER_TARGET_LENGTH];
};