[Mesa-dev] [PATCH] r600g: fix alpha-test with HyperZ enabled, fixing L4D2 tree corruption
Benjamin
b.bellec at gmail.com
Tue Sep 2 12:35:44 PDT 2014
Tested-by: Benjamin Bellec <b.bellec at gmail.com>
2014-09-02 21:14 GMT+02:00 Marek Olšák <maraeo at gmail.com>:
> From: Marek Olšák <marek.olsak at amd.com>
>
> *_update_db_shader_control depends on the alpha test state. The problem was
> it was in a block which is only entered if the pixel shader is changed.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74863
>
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/gallium/drivers/r600/r600_state_common.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_state_common.c
> b/src/gallium/drivers/r600/r600_state_common.c
> index 028d800..d9174a5 100644
> --- a/src/gallium/drivers/r600/r600_state_common.c
> +++ b/src/gallium/drivers/r600/r600_state_common.c
> @@ -1245,12 +1245,6 @@ static bool r600_update_derived_state(struct
> r600_context *rctx)
> }
> }
>
> - if (rctx->b.chip_class >= EVERGREEN) {
> - evergreen_update_db_shader_control(rctx);
> - } else {
> - r600_update_db_shader_control(rctx);
> - }
> -
> if (unlikely(!ps_dirty && rctx->ps_shader &&
> rctx->rasterizer &&
> ((rctx->rasterizer->sprite_coord_enable !=
> rctx->ps_shader->current->sprite_coord_enable) ||
>
> (rctx->rasterizer->flatshade != rctx->ps_shader->current->flatshade)))) {
> @@ -1264,6 +1258,12 @@ static bool r600_update_derived_state(struct
> r600_context *rctx)
> update_shader_atom(ctx, &rctx->pixel_shader,
> rctx->ps_shader->current);
> }
>
> + if (rctx->b.chip_class >= EVERGREEN) {
> + evergreen_update_db_shader_control(rctx);
> + } else {
> + r600_update_db_shader_control(rctx);
> + }
> +
> /* on R600 we stuff masks + txq info into one constant buffer */
> /* on evergreen we only need a txq info one */
> if (rctx->b.chip_class < EVERGREEN) {
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140902/1e2113bf/attachment.html>
More information about the mesa-dev
mailing list