[Mesa-dev] [PATCH] radv: set fmask state to all 0s when no fmask. (v2)

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Jun 9 07:09:34 UTC 2017


Reviewed-by: Bas Nieuwenhuizen <basni at google.com>

On Fri, Jun 9, 2017 at 3:40 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> The shader reads the descriptor to decide if it should take the
> fmask value, however we weren't initing it always, which meant
> random crap, esp with MSAA depth textures.
>
> Fixes random hangs with:
> dEQP-VK.glsl.builtin_var.fragdepth.*
>
> v2: check fmask_state is not NULL
>
> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/vulkan/radv_image.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
> index 9a2f32b..91c7e5f 100644
> --- a/src/amd/vulkan/radv_image.c
> +++ b/src/amd/vulkan/radv_image.c
> @@ -499,7 +499,8 @@ si_make_texture_descriptor(struct radv_device *device,
>                                 S_008F20_PITCH_GFX6(image->fmask.pitch_in_pixels - 1);
>                         fmask_state[5] |= S_008F24_LAST_ARRAY(last_layer);
>                 }
> -       }
> +       } else if (fmask_state)
> +               memset(fmask_state, 0, 8 * 4);
>  }
>
>  static void
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list