etnaviv: set DITHER_MODE
authorJonathan Marek <jonathan@marek.ca>
Fri, 12 Jul 2019 23:26:32 +0000 (19:26 -0400)
committerJonathan Marek <jonathan@marek.ca>
Thu, 18 Jul 2019 03:07:50 +0000 (23:07 -0400)
This fixes a rendering glitch observed in SDL testscale test, where alpha
blending samples with value (1.0, 1.0, 1.0, 0.0) whitens the target instead
of having no effect.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_blend.c

index 637586aee72374faefac037c6851a91898e7c609..1f57499e454f05ffeb8add7b05cad8aa8ef2f40b 100644 (file)
@@ -90,6 +90,7 @@ etna_blend_state_create(struct pipe_context *pctx,
 
    co->PE_LOGIC_OP =
          VIVS_PE_LOGIC_OP_OP(logicop_enable ? so->logicop_func : LOGIC_OP_COPY) |
+         VIVS_PE_LOGIC_OP_DITHER_MODE(3) | /* TODO: related to dithering, sometimes 2 */
          0x000E4000 /* ??? */;
 
    co->fo_allowed = !alpha_enable && !logicop_enable;