mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
panfrost: Track surfaces drawn per-batch
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929>
This commit is contained in:
parent
64734c0947
commit
5d0d8faaa6
3 changed files with 13 additions and 1 deletions
|
|
@ -668,6 +668,7 @@ panfrost_frag_meta_blend_update(struct panfrost_context *ctx,
|
|||
struct mali_shader_meta *fragmeta,
|
||||
void *rts)
|
||||
{
|
||||
struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
|
||||
const struct panfrost_device *dev = pan_device(ctx->base.screen);
|
||||
struct panfrost_shader_state *fs;
|
||||
fs = panfrost_get_shader_state(ctx, PIPE_SHADER_FRAGMENT);
|
||||
|
|
@ -749,6 +750,8 @@ panfrost_frag_meta_blend_update(struct panfrost_context *ctx,
|
|||
|
||||
SET_BIT(fragmeta->unknown2_3, MALI_CAN_DISCARD,
|
||||
!blend[0].no_blending || fs->can_discard);
|
||||
|
||||
batch->draws |= PIPE_CLEAR_COLOR0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -769,6 +772,7 @@ panfrost_frag_meta_blend_update(struct panfrost_context *ctx,
|
|||
|
||||
if (ctx->pipe_framebuffer.nr_cbufs > i && !blend[i].no_colour) {
|
||||
flags = 0x200;
|
||||
batch->draws |= (PIPE_CLEAR_COLOR0 << i);
|
||||
|
||||
bool is_srgb = (ctx->pipe_framebuffer.nr_cbufs > i) &&
|
||||
(ctx->pipe_framebuffer.cbufs[i]) &&
|
||||
|
|
|
|||
|
|
@ -1182,8 +1182,13 @@ panfrost_batch_set_requirements(struct panfrost_batch *batch)
|
|||
if (ctx->rasterizer && ctx->rasterizer->base.multisample)
|
||||
batch->requirements |= PAN_REQ_MSAA;
|
||||
|
||||
if (ctx->depth_stencil && ctx->depth_stencil->depth.writemask)
|
||||
if (ctx->depth_stencil && ctx->depth_stencil->depth.writemask) {
|
||||
batch->requirements |= PAN_REQ_DEPTH_WRITE;
|
||||
batch->draws |= PIPE_CLEAR_DEPTH;
|
||||
}
|
||||
|
||||
if (ctx->depth_stencil && ctx->depth_stencil->stencil[0].enabled)
|
||||
batch->draws |= PIPE_CLEAR_STENCIL;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ struct panfrost_batch {
|
|||
/* Buffers cleared (PIPE_CLEAR_* bitmask) */
|
||||
unsigned clear;
|
||||
|
||||
/* Buffers drawn */
|
||||
unsigned draws;
|
||||
|
||||
/* Packed clear values, indexed by both render target as well as word.
|
||||
* Essentially, a single pixel is packed, with some padding to bring it
|
||||
* up to a 32-bit interval; that pixel is then duplicated over to fill
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue