[Mesa-dev] [PATCH] i965: allocate at least 1 BLEND_STATE element
Mike Stroyan
mike at lunarg.com
Wed Jul 1 12:52:11 PDT 2015
Fixes: (Flickering shadows in unreleased title trace)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80500
<https://bugs.freedesktop.org/show_bug.cgi?id=91173>
On Wed, Jul 1, 2015 at 10:16 AM, Mike Stroyan <mike at lunarg.com> wrote:
> When there are no color buffer render targets, gen6 and gen7 still
> use the first BLEND_STATE element to determine alpha test.
> gen6_upload_blend_state was allocating zero elements when
> ctx->Color.AlphaEnabled was false.
> That left _3DSTATE_CC_STATE_POINTERS or _3DSTATE_BLEND_STATE_POINTERS
> pointing to random data from some previous brw_state_batch().
> That sometimes suppressed depth rendering when those bits
> happened to mean COMPAREFUNC_NEVER.
> This produced flickering shadows for dota2 reborn.
> ---
> src/mesa/drivers/dri/i965/gen6_cc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c
> b/src/mesa/drivers/dri/i965/gen6_cc.c
> index 2bfa271..2b76e24 100644
> --- a/src/mesa/drivers/dri/i965/gen6_cc.c
> +++ b/src/mesa/drivers/dri/i965/gen6_cc.c
> @@ -51,7 +51,7 @@ gen6_upload_blend_state(struct brw_context *brw)
> * with render target 0, which will reference BLEND_STATE[0] for
> * alpha test enable.
> */
> - if (nr_draw_buffers == 0 && ctx->Color.AlphaEnabled)
> + if (nr_draw_buffers == 0)
> nr_draw_buffers = 1;
>
> size = sizeof(*blend) * nr_draw_buffers;
> --
> 2.1.0
>
>
--
Mike Stroyan - Software Architect
LunarG, Inc. - The Graphics Experts
Cell: (970) 219-7905
Email: Mike at LunarG.com
Website: http://www.lunarg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150701/eb340c69/attachment.html>
More information about the mesa-dev
mailing list