mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
panfrost: Add the usual clean/dirty helpers
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10888>
This commit is contained in:
parent
744a9aef7b
commit
a4b0da78bb
1 changed files with 19 additions and 0 deletions
|
|
@ -381,5 +381,24 @@ panfrost_vertex_buffer_address(struct panfrost_context *ctx, unsigned i);
|
|||
void
|
||||
panfrost_compute_context_init(struct pipe_context *pctx);
|
||||
|
||||
static inline void
|
||||
panfrost_dirty_state_all(struct panfrost_context *ctx)
|
||||
{
|
||||
ctx->dirty = ~0;
|
||||
|
||||
for (unsigned i = 0; i < PIPE_SHADER_TYPES; ++i)
|
||||
ctx->dirty_shader[i] = ~0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
panfrost_clean_state_3d(struct panfrost_context *ctx)
|
||||
{
|
||||
ctx->dirty = 0;
|
||||
|
||||
for (unsigned i = 0; i < PIPE_SHADER_TYPES; ++i) {
|
||||
if (i != PIPE_SHADER_COMPUTE)
|
||||
ctx->dirty_shader[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue