panfrost: Dirty track fragment images

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10888>
This commit is contained in:
Alyssa Rosenzweig 2021-05-19 14:40:08 -04:00 committed by Marge Bot
parent 0c3c6cf473
commit fab1fabb4f
2 changed files with 10 additions and 1 deletions

View file

@ -332,6 +332,11 @@ panfrost_update_state_fs(struct panfrost_batch *batch)
if (dirty & PAN_DIRTY_STAGE_RENDERER)
batch->rsd[st] = panfrost_emit_frag_shader_meta(batch);
if (dirty & PAN_DIRTY_STAGE_IMAGE) {
batch->attribs[st] = panfrost_emit_image_attribs(batch,
&batch->attrib_bufs[st], st);
}
panfrost_update_state_tex(batch, st);
}
@ -415,7 +420,8 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
cfg.cull_back_face = rast->cull_face & PIPE_FACE_BACK;
cfg.position = pos;
cfg.state = batch->rsd[PIPE_SHADER_FRAGMENT];
cfg.attributes = panfrost_emit_image_attribs(batch, &cfg.attribute_buffers, PIPE_SHADER_FRAGMENT);
cfg.attributes = batch->attribs[PIPE_SHADER_FRAGMENT];
cfg.attribute_buffers = batch->attrib_bufs[PIPE_SHADER_FRAGMENT];
cfg.viewport = batch->viewport;
cfg.varyings = fs_vary;
cfg.varying_buffers = fs_vary ? varyings : 0;
@ -846,6 +852,7 @@ panfrost_set_shader_images(
const struct pipe_image_view *iviews)
{
struct panfrost_context *ctx = pan_context(pctx);
ctx->dirty_shader[PIPE_SHADER_FRAGMENT] |= PAN_DIRTY_STAGE_IMAGE;
/* Unbind start_slot...start_slot+count */
if (!iviews) {

View file

@ -120,6 +120,8 @@ struct panfrost_batch {
mali_ptr rsd[PIPE_SHADER_TYPES];
mali_ptr textures[PIPE_SHADER_TYPES];
mali_ptr samplers[PIPE_SHADER_TYPES];
mali_ptr attribs[PIPE_SHADER_TYPES];
mali_ptr attrib_bufs[PIPE_SHADER_TYPES];
};
/* Functions for managing the above */