diff options
author | Eric Anholt <[email protected]> | 2017-09-18 12:58:05 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-09-18 16:16:00 -0700 |
commit | 4db9ad98939711e5c00e9ffb196614fcd9a98ad8 (patch) | |
tree | 9667b6b22778a646abde0534de1fb81761138dc8 /src/gallium/drivers | |
parent | 9940fb42058e0b0815e0edb202ca69b7853aead5 (diff) |
broadcom/vc4: Fix crashes since the gallium blitter reworks.
Even if we're not clearing color, the blitter has started dereferencing
the color value.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_draw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c index fdf983dae7f..da748cdc14d 100644 --- a/src/gallium/drivers/vc4/vc4_draw.c +++ b/src/gallium/drivers/vc4/vc4_draw.c @@ -517,6 +517,8 @@ vc4_clear(struct pipe_context *pctx, unsigned buffers, zsclear == PIPE_CLEAR_STENCIL) && (rsc->initialized_buffers & ~(zsclear | job->cleared)) && util_format_is_depth_and_stencil(vc4->framebuffer.zsbuf->format)) { + static const union pipe_color_union dummy_color = {}; + perf_debug("Partial clear of Z+stencil buffer, " "drawing a quad instead of fast clearing\n"); vc4_blitter_save(vc4); @@ -525,7 +527,7 @@ vc4_clear(struct pipe_context *pctx, unsigned buffers, vc4->framebuffer.height, 1, zsclear, - NULL, depth, stencil); + &dummy_color, depth, stencil); buffers &= ~zsclear; if (!buffers) return; |