[Mesa-dev] [PATCH] anv: Advertise support for VK_FORMAT_R8_SRGB
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Fri Jun 30 08:14:03 UTC 2017
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
On 30/06/17 02:53, Jason Ekstrand wrote:
> Unreal Engine 4 seems to really like this format for some reason. We
> don't technically have the hardware format but we do have L8_SRGB. It's
> easy enough to fake with that and a swizzle.
> ---
> src/intel/vulkan/anv_formats.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
> index 0bc81d1..3535c09 100644
> --- a/src/intel/vulkan/anv_formats.c
> +++ b/src/intel/vulkan/anv_formats.c
> @@ -74,7 +74,8 @@ static const struct anv_format anv_formats[] = {
> fmt(VK_FORMAT_R8_SSCALED, ISL_FORMAT_R8_SSCALED),
> fmt(VK_FORMAT_R8_UINT, ISL_FORMAT_R8_UINT),
> fmt(VK_FORMAT_R8_SINT, ISL_FORMAT_R8_SINT),
> - fmt(VK_FORMAT_R8_SRGB, ISL_FORMAT_UNSUPPORTED),
> + swiz_fmt(VK_FORMAT_R8_SRGB, ISL_FORMAT_L8_UNORM_SRGB,
> + _ISL_SWIZZLE(RED, ZERO, ZERO, ONE)),
> fmt(VK_FORMAT_R8G8_UNORM, ISL_FORMAT_R8G8_UNORM),
> fmt(VK_FORMAT_R8G8_SNORM, ISL_FORMAT_R8G8_SNORM),
> fmt(VK_FORMAT_R8G8_USCALED, ISL_FORMAT_R8G8_USCALED),
More information about the mesa-dev
mailing list