From: Jason Ekstrand Date: Fri, 30 Jun 2017 01:52:03 +0000 (-0700) Subject: anv: Advertise support VK_FORMAT_R8_SRGB X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9ec51aa0fed786962508b7d778c72b13a06e541c;p=mesa.git anv: Advertise support VK_FORMAT_R8_SRGB 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. Reviewed-by: Kenneth Graunke Reviewed-by: Lionel Landwerlin --- diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 47acc56fd04..049ffe17ac0 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),