projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45c9338
)
anv/formats: Add support for VK_FORMAT_B4G4R4A4_UNORM pre-gen8
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Mon, 16 May 2016 18:02:57 +0000
(11:02 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Tue, 17 May 2016 19:17:22 +0000
(12:17 -0700)
src/intel/vulkan/anv_formats.c
patch
|
blob
|
history
diff --git
a/src/intel/vulkan/anv_formats.c
b/src/intel/vulkan/anv_formats.c
index bd8d11fb2b232f43846c7a39633b288245659236..b52c7ca20f4fbcb6f3ebbca37d3584935d70d048 100644
(file)
--- a/
src/intel/vulkan/anv_formats.c
+++ b/
src/intel/vulkan/anv_formats.c
@@
-287,6
+287,16
@@
anv_get_format(const struct brw_device_info *devinfo, VkFormat vk_format,
}
}
+ /* The B4G4R4A4 format isn't available prior to Sky Lake so we have to fall
+ * back to a format with a more complex swizzle.
+ */
+ if (vk_format == VK_FORMAT_B4G4R4A4_UNORM_PACK16 && devinfo->gen < 9) {
+ return (struct anv_format) {
+ .isl_format = ISL_FORMAT_B4G4R4A4_UNORM,
+ .swizzle = ISL_SWIZZLE(GREEN, RED, ALPHA, BLUE),
+ };
+ }
+
return format;
}