summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-07-26 11:33:45 -0700
committerJason Ekstrand <[email protected]>2016-08-23 11:45:24 -0700
commitfb90291dd5a734de3eb2ab59d883df3d2f9db0c7 (patch)
tree2a94062ea531b6c8b4e83b08ae85abd1e5cca278 /src/intel
parent4f3f8bb59dd98e39c363fe47a55a7f97e7df9f4b (diff)
anv/formats: Don't use an RGBX format if it isn't renderable
The whole point of using RGBX is so that we can render to it so if it isn't renderable, that kind-of defeats the purpose. Some formats (one example is R32G32B32X32_SFLOAT) exist in the format table but aren't actually renderable. Eventually, we'd like to get away from RGBX entirely, but this fixes hangs on BDW today. Signed-off-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-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 b06e29baaf8..bbfb2925d77 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -278,7 +278,8 @@ anv_get_format(const struct brw_device_info *devinfo, VkFormat vk_format,
* hood.
*/
enum isl_format rgbx = isl_format_rgb_to_rgbx(format.isl_format);
- if (rgbx != ISL_FORMAT_UNSUPPORTED) {
+ if (rgbx != ISL_FORMAT_UNSUPPORTED &&
+ isl_format_supports_rendering(devinfo, rgbx)) {
format.isl_format = rgbx;
} else {
format.isl_format = isl_format_rgb_to_rgba(format.isl_format);