summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_image.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-06-09 13:56:16 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-06-22 12:26:43 -0700
commitd82322eb188f258a7dca9ea2b59cc0332dbc4d61 (patch)
treecfdec4c1301466607a9476ff7066d798d66e4a25 /src/intel/vulkan/anv_image.c
parent97f12773b89a409d1368ce6b3b5badb9e75bbf53 (diff)
downloadexternal_mesa3d-d82322eb188f258a7dca9ea2b59cc0332dbc4d61.zip
external_mesa3d-d82322eb188f258a7dca9ea2b59cc0332dbc4d61.tar.gz
external_mesa3d-d82322eb188f258a7dca9ea2b59cc0332dbc4d61.tar.bz2
anv,isl: Lower storage image formats in anv
ISL was being a bit too clever for its own good and lowering the format for us. This is all well and good *if* we always want to lower it. However, the GL driver selectively lowers the format depending on whether the surface is write-only or not. Reviewed-by: Chad Versace <chad.versace@intel.com> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/intel/vulkan/anv_image.c')
-rw-r--r--src/intel/vulkan/anv_image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 208e377..77d9931 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -537,12 +537,15 @@ anv_image_view_init(struct anv_image_view *iview,
iview->color_rt_surface_state.alloc_size = 0;
}
+ /* NOTE: This one needs to go last since it may stomp isl_view.format */
if (image->usage & usage_mask & VK_IMAGE_USAGE_STORAGE_BIT) {
iview->storage_surface_state = alloc_surface_state(device, cmd_buffer);
if (isl_has_matching_typed_storage_image_format(&device->info,
format.isl_format)) {
isl_view.usage = cube_usage | ISL_SURF_USAGE_STORAGE_BIT;
+ isl_view.format = isl_lower_storage_image_format(&device->info,
+ isl_view.format);
isl_surf_fill_state(&device->isl_dev,
iview->storage_surface_state.map,
.surf = &surface->isl,