[Mesa-dev] [PATCH] r600: ignore PIPE_BIND_LINEAR in *_is_format_supported
Dieter Nützel
Dieter at nuetzel-hh.de
Wed Mar 30 15:39:48 UTC 2016
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
Thanks!
Am 30.03.2016 15:40, schrieb Christian König:
> From: Christian König <christian.koenig at amd.com>
>
> Similar to radeonsi linear layout should work for all not compressed
> or depth/stencil formats. Fixes issues with VDPAU on r600.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
> src/gallium/drivers/r600/evergreen_state.c | 5 +++++
> src/gallium/drivers/r600/r600_state.c | 5 +++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/src/gallium/drivers/r600/evergreen_state.c
> b/src/gallium/drivers/r600/evergreen_state.c
> index 83313cb..6595267 100644
> --- a/src/gallium/drivers/r600/evergreen_state.c
> +++ b/src/gallium/drivers/r600/evergreen_state.c
> @@ -299,6 +299,11 @@ boolean evergreen_is_format_supported(struct
> pipe_screen *screen,
> if (usage & PIPE_BIND_TRANSFER_WRITE)
> retval |= PIPE_BIND_TRANSFER_WRITE;
>
> + if ((usage & PIPE_BIND_LINEAR) &&
> + !util_format_is_compressed(format) &&
> + !(usage & PIPE_BIND_DEPTH_STENCIL))
> + retval |= PIPE_BIND_LINEAR;
> +
> return retval == usage;
> }
>
> diff --git a/src/gallium/drivers/r600/r600_state.c
> b/src/gallium/drivers/r600/r600_state.c
> index f902619..3189a13 100644
> --- a/src/gallium/drivers/r600/r600_state.c
> +++ b/src/gallium/drivers/r600/r600_state.c
> @@ -239,6 +239,11 @@ boolean r600_is_format_supported(struct
> pipe_screen *screen,
> if (usage & PIPE_BIND_TRANSFER_WRITE)
> retval |= PIPE_BIND_TRANSFER_WRITE;
>
> + if ((usage & PIPE_BIND_LINEAR) &&
> + !util_format_is_compressed(format) &&
> + !(usage & PIPE_BIND_DEPTH_STENCIL))
> + retval |= PIPE_BIND_LINEAR;
> +
> return retval == usage;
> }
More information about the mesa-dev
mailing list