diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-17 16:19:45 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-18 10:42:43 -0700 |
commit | 5c554e235dc5376a0b2d1a8847a527f9e06f4873 (patch) | |
tree | e9b8e6b0e2c759b66e0ec4029aa7a2b4cfef5f59 /src/gallium/drivers | |
parent | 676b9339dd1ec2c85b1d223103a295a06efcffe1 (diff) |
panfrost: Use correct NO_DITHER field on MFBD
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_blend_cso.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_blend_cso.c b/src/gallium/drivers/panfrost/pan_blend_cso.c index f2dafe062ce..5055d2d854e 100644 --- a/src/gallium/drivers/panfrost/pan_blend_cso.c +++ b/src/gallium/drivers/panfrost/pan_blend_cso.c @@ -142,7 +142,9 @@ panfrost_bind_blend_state(struct pipe_context *pipe, if (!blend) return; - SET_BIT(ctx->fragment_shader_core.unknown2_4, MALI_NO_DITHER, !blend->dither); + if (ctx->require_sfbd) { + SET_BIT(ctx->fragment_shader_core.unknown2_4, MALI_NO_DITHER, !blend->dither); + } /* Shader itself is not dirty, but the shader core is */ ctx->dirty |= PAN_DIRTY_FS; diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 26276cde073..c022e950c00 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1225,6 +1225,9 @@ panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data) if (is_srgb) rts[i].flags |= MALI_BLEND_SRGB; + if (!ctx->blend->base.dither) + rts[i].flags |= MALI_BLEND_NO_DITHER; + /* TODO: sRGB in blend shaders is currently * unimplemented. Contact me (Alyssa) if you're * interested in working on this. We have |