Commit 4f782742 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜
Browse files

panfrost: Dither fast clears



We can do this at no additional cost, the DDK does it, and I already
went to the effort of typing this all out and unit testing it under the
mistaken belief it was mandatory... so we might as well take advantage
of it after all.
Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
parent 2ac29047
Pipeline #384290 waiting for manual action with stages
...@@ -929,6 +929,7 @@ panfrost_batch_clear(struct panfrost_batch *batch, ...@@ -929,6 +929,7 @@ panfrost_batch_clear(struct panfrost_batch *batch,
double depth, unsigned stencil) double depth, unsigned stencil)
{ {
struct panfrost_context *ctx = batch->ctx; struct panfrost_context *ctx = batch->ctx;
struct panfrost_blend_state *blend = ctx->blend;
if (buffers & PIPE_CLEAR_COLOR) { if (buffers & PIPE_CLEAR_COLOR) {
for (unsigned i = 0; i < ctx->pipe_framebuffer.nr_cbufs; ++i) { for (unsigned i = 0; i < ctx->pipe_framebuffer.nr_cbufs; ++i) {
...@@ -936,7 +937,8 @@ panfrost_batch_clear(struct panfrost_batch *batch, ...@@ -936,7 +937,8 @@ panfrost_batch_clear(struct panfrost_batch *batch,
continue; continue;
enum pipe_format format = ctx->pipe_framebuffer.cbufs[i]->format; enum pipe_format format = ctx->pipe_framebuffer.cbufs[i]->format;
pan_pack_color(batch->clear_color[i], color, format, false); bool dither = blend ? blend->base.dither : false;
pan_pack_color(batch->clear_color[i], color, format, dither);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment