summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen8_state.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-01-22 11:57:01 -0800
committerJason Ekstrand <[email protected]>2016-01-22 11:57:01 -0800
commite5558ffa64207e121f0745ff62eeec10fce08b23 (patch)
tree88836cfa4290009e6027ee14b4fdcbe6db87a460 /src/vulkan/gen8_state.c
parent84612f4014089b089c9a04a6592b5a1ea7423c70 (diff)
anv/image: Move common code to anv_image.c
Diffstat (limited to 'src/vulkan/gen8_state.c')
-rw-r--r--src/vulkan/gen8_state.c58
1 files changed, 1 insertions, 57 deletions
diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c
index 15bf0ffe4ac..620a9d4ef13 100644
--- a/src/vulkan/gen8_state.c
+++ b/src/vulkan/gen8_state.c
@@ -78,17 +78,6 @@ static const uint8_t anv_valign[] = {
[16] = VALIGN16,
};
-static struct anv_state
-alloc_surface_state(struct anv_device *device,
- struct anv_cmd_buffer *cmd_buffer)
-{
- if (cmd_buffer) {
- return anv_cmd_buffer_alloc_surface_state(cmd_buffer);
- } else {
- return anv_state_pool_alloc(&device->surface_state_pool, 64, 64);
- }
-}
-
/**
* Get the values to pack into RENDER_SUFFACE_STATE.SurfaceHorizontalAlignment
* and SurfaceVerticalAlignment.
@@ -162,7 +151,7 @@ get_qpitch(const struct isl_surf *surf)
}
}
-static void
+void
genX(fill_image_surface_state)(struct anv_device *device, void *state_map,
struct anv_image_view *iview,
const VkImageViewCreateInfo *pCreateInfo,
@@ -320,51 +309,6 @@ genX(fill_image_surface_state)(struct anv_device *device, void *state_map,
}
GENX(RENDER_SURFACE_STATE_pack)(NULL, state_map, &template);
-
- if (!device->info.has_llc)
- anv_state_clflush(iview->nonrt_surface_state);
-}
-
-void
-genX(image_view_init)(struct anv_image_view *iview,
- struct anv_device *device,
- const VkImageViewCreateInfo* pCreateInfo,
- struct anv_cmd_buffer *cmd_buffer)
-{
- ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
-
- if (image->needs_nonrt_surface_state) {
- iview->nonrt_surface_state =
- alloc_surface_state(device, cmd_buffer);
-
- genX(fill_image_surface_state)(device, iview->nonrt_surface_state.map,
- iview, pCreateInfo,
- VK_IMAGE_USAGE_SAMPLED_BIT);
- } else {
- iview->nonrt_surface_state.alloc_size = 0;
- }
-
- if (image->needs_color_rt_surface_state) {
- iview->color_rt_surface_state =
- alloc_surface_state(device, cmd_buffer);
-
- genX(fill_image_surface_state)(device, iview->color_rt_surface_state.map,
- iview, pCreateInfo,
- VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
- } else {
- iview->color_rt_surface_state.alloc_size = 0;
- }
-
- if (image->needs_storage_surface_state) {
- iview->storage_surface_state =
- alloc_surface_state(device, cmd_buffer);
-
- genX(fill_image_surface_state)(device, iview->storage_surface_state.map,
- iview, pCreateInfo,
- VK_IMAGE_USAGE_STORAGE_BIT);
- } else {
- iview->storage_surface_state.alloc_size = 0;
- }
}
VkResult genX(CreateSampler)(