summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen7_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/gen7_state.c')
-rw-r--r--src/vulkan/gen7_state.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c
index 6ffbacd8e77..4101e84f827 100644
--- a/src/vulkan/gen7_state.c
+++ b/src/vulkan/gen7_state.c
@@ -332,4 +332,18 @@ genX(image_view_init)(struct anv_image_view *iview,
if (!device->info.has_llc)
anv_state_clflush(iview->color_rt_surface_state);
}
+
+ if (image->needs_storage_surface_state) {
+ iview->storage_surface_state = alloc_surface_state(device, cmd_buffer);
+
+ surface_state.SurfaceFormat =
+ isl_lower_storage_image_format(&device->isl_dev,
+ format->surface_format);
+
+ surface_state.SurfaceMinLOD = range->baseMipLevel;
+ surface_state.MIPCountLOD = range->levelCount - 1;
+
+ GENX(RENDER_SURFACE_STATE_pack)(NULL, iview->storage_surface_state.map,
+ &surface_state);
+ }
}