summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-04-06 15:19:30 -0700
committerEric Anholt <eric@anholt.net>2015-04-13 10:39:24 -0700
commit5100221ff705019334fcdc17da99d257224d2aff (patch)
tree1e69e4725e1a8a75f02fad38cce5d1818cb28508 /src/gallium/drivers/vc4/vc4_context.c
parent725620f21d19365d7a8a34d0c72694384c680afc (diff)
downloadexternal_mesa3d-5100221ff705019334fcdc17da99d257224d2aff.zip
external_mesa3d-5100221ff705019334fcdc17da99d257224d2aff.tar.gz
external_mesa3d-5100221ff705019334fcdc17da99d257224d2aff.tar.bz2
vc4: Skip sending down the clear colors if not clearing.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index 9b2ee5c..daa5ba5 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -129,11 +129,13 @@ vc4_setup_rcl(struct vc4_context *vc4)
branch_size +
color_store_size));
- cl_u8(&vc4->rcl, VC4_PACKET_CLEAR_COLORS);
- cl_u32(&vc4->rcl, vc4->clear_color[0]);
- cl_u32(&vc4->rcl, vc4->clear_color[1]);
- cl_u32(&vc4->rcl, vc4->clear_depth);
- cl_u8(&vc4->rcl, vc4->clear_stencil);
+ if (vc4->cleared) {
+ cl_u8(&vc4->rcl, VC4_PACKET_CLEAR_COLORS);
+ cl_u32(&vc4->rcl, vc4->clear_color[0]);
+ cl_u32(&vc4->rcl, vc4->clear_color[1]);
+ cl_u32(&vc4->rcl, vc4->clear_depth);
+ cl_u8(&vc4->rcl, vc4->clear_stencil);
+ }
/* The rendering mode config determines the pointer that's used for
* VC4_PACKET_STORE_MS_TILE_BUFFER address computations. The kernel