aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_formats.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-29 18:52:03 -0700
committerJason Ekstrand <[email protected]>2017-09-19 12:06:30 -0700
commit9ec51aa0fed786962508b7d778c72b13a06e541c (patch)
tree048b78040019e553e9b311719c0727f3b250bfc9 /src/intel/vulkan/anv_formats.c
parenta8ba57d35686bd55ffd2f7786b2ad10539ce0cc5 (diff)
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 <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_formats.c')
-rw-r--r--src/intel/vulkan/anv_formats.c3
1 files changed, 2 insertions, 1 deletions
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),