summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_blend.c
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2017-11-15 17:33:17 +0100
committerLucas Stach <[email protected]>2017-11-18 12:33:49 +0100
commitf5d477f447bb23433f8c9e1376ef61c3f6d905ea (patch)
tree6f704ba64d39eb47edc681a6f29d469466d6bc17 /src/gallium/drivers/etnaviv/etnaviv_blend.c
parent1eab327ba7184fde6597f4ae061fb408ff41e93b (diff)
etnaviv: enable full overwrite when no color buffer is present
The OVERWRITE bit disables destination fetches, which is exactly what we want when there is no valid color buffer bound. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_blend.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_blend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_blend.c b/src/gallium/drivers/etnaviv/etnaviv_blend.c
index 1b432bd6871..9c23411d4ff 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_blend.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_blend.c
@@ -131,8 +131,8 @@ etna_update_blend(struct etna_context *ctx)
* - The color mask is 1111
* - No blending is used
*/
- bool full_overwrite = (rt0->colormask == 0xf) &&
- blend->fo_allowed;
+ bool full_overwrite = ((rt0->colormask == 0xf) && blend->fo_allowed) ||
+ !pfb->cbufs[0];
blend->PE_COLOR_FORMAT =
VIVS_PE_COLOR_FORMAT_COMPONENTS(colormask) |
COND(full_overwrite, VIVS_PE_COLOR_FORMAT_OVERWRITE);