summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen8_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/gen8_state.c')
-rw-r--r--src/vulkan/gen8_state.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c
index c47d317d2a3..2b820a3177d 100644
--- a/src/vulkan/gen8_state.c
+++ b/src/vulkan/gen8_state.c
@@ -119,9 +119,8 @@ VkResult gen8_CreateBufferView(
const struct anv_format *format =
anv_format_for_vk_format(pCreateInfo->format);
- gen8_fill_buffer_surface_state(bview->surface_view.surface_state.map,
- format, bview->surface_view.offset,
- pCreateInfo->range);
+ gen8_fill_buffer_surface_state(bview->surface_state.map, format,
+ bview->offset, pCreateInfo->range);
*pView = anv_buffer_view_to_handle(bview);
@@ -149,7 +148,6 @@ gen8_image_view_init(struct anv_image_view *iview,
ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
const VkImageSubresourceRange *range = &pCreateInfo->subresourceRange;
- struct anv_surface_view *sview = &iview->surface_view;
struct anv_surface *surface =
anv_image_get_surface_for_aspect_mask(image, range->aspectMask);
@@ -162,9 +160,9 @@ gen8_image_view_init(struct anv_image_view *iview,
const struct anv_image_view_info view_type_info =
anv_image_view_info_for_vk_image_view_type(pCreateInfo->viewType);
- sview->bo = image->bo;
- sview->offset = image->offset + surface->offset;
- sview->format = format_info;
+ iview->bo = image->bo;
+ iview->offset = image->offset + surface->offset;
+ iview->format = format_info;
iview->extent = (VkExtent3D) {
.width = anv_minify(image->extent.width, range->baseMipLevel),
@@ -267,18 +265,18 @@ gen8_image_view_init(struct anv_image_view *iview,
.ShaderChannelSelectBlue = vk_to_gen_swizzle[pCreateInfo->channels.b],
.ShaderChannelSelectAlpha = vk_to_gen_swizzle[pCreateInfo->channels.a],
.ResourceMinLOD = 0.0,
- .SurfaceBaseAddress = { NULL, sview->offset },
+ .SurfaceBaseAddress = { NULL, iview->offset },
};
if (cmd_buffer) {
- sview->surface_state =
+ iview->surface_state =
anv_state_stream_alloc(&cmd_buffer->surface_state_stream, 64, 64);
} else {
- sview->surface_state =
+ iview->surface_state =
anv_state_pool_alloc(&device->surface_state_pool, 64, 64);
}
- GEN8_RENDER_SURFACE_STATE_pack(NULL, sview->surface_state.map,
+ GEN8_RENDER_SURFACE_STATE_pack(NULL, iview->surface_state.map,
&surface_state);
}
@@ -290,7 +288,7 @@ gen8_color_attachment_view_init(struct anv_color_attachment_view *cview,
{
ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
struct anv_attachment_view *aview = &cview->attachment_view;
- struct anv_surface_view *sview = &cview->surface_view;
+ struct anv_image_view *iview = &cview->image_view;
struct anv_surface *surface =
anv_image_get_surface_for_color_attachment(image);
const struct anv_format *format_info =
@@ -305,9 +303,9 @@ gen8_color_attachment_view_init(struct anv_color_attachment_view *cview,
anv_assert(pCreateInfo->mipLevel < image->levels);
anv_assert(pCreateInfo->baseArraySlice + pCreateInfo->arraySize <= image->array_size);
- sview->bo = image->bo;
- sview->offset = image->offset + surface->offset;
- sview->format = anv_format_for_vk_format(pCreateInfo->format);
+ iview->bo = image->bo;
+ iview->offset = image->offset + surface->offset;
+ iview->format = anv_format_for_vk_format(pCreateInfo->format);
aview->extent = (VkExtent3D) {
.width = anv_minify(image->extent.width, pCreateInfo->mipLevel),
@@ -355,10 +353,10 @@ gen8_color_attachment_view_init(struct anv_color_attachment_view *cview,
}
if (cmd_buffer) {
- sview->surface_state =
+ iview->surface_state =
anv_state_stream_alloc(&cmd_buffer->surface_state_stream, 64, 64);
} else {
- sview->surface_state =
+ iview->surface_state =
anv_state_pool_alloc(&device->surface_state_pool, 64, 64);
}
@@ -411,10 +409,10 @@ gen8_color_attachment_view_init(struct anv_color_attachment_view *cview,
.ShaderChannelSelectBlue = SCS_BLUE,
.ShaderChannelSelectAlpha = SCS_ALPHA,
.ResourceMinLOD = 0.0,
- .SurfaceBaseAddress = { NULL, sview->offset },
+ .SurfaceBaseAddress = { NULL, iview->offset },
};
- GEN8_RENDER_SURFACE_STATE_pack(NULL, sview->surface_state.map,
+ GEN8_RENDER_SURFACE_STATE_pack(NULL, iview->surface_state.map,
&surface_state);
}