summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vulkan/image.c4
-rw-r--r--src/vulkan/meta.c24
-rw-r--r--src/vulkan/private.h5
3 files changed, 16 insertions, 17 deletions
diff --git a/src/vulkan/image.c b/src/vulkan/image.c
index 340df8a5af1..4b37de54dde 100644
--- a/src/vulkan/image.c
+++ b/src/vulkan/image.c
@@ -372,7 +372,7 @@ anv_image_view_init(struct anv_image_view *iview,
view->offset = image->offset + surface->offset;
view->format = pCreateInfo->format;
- view->extent = (VkExtent3D) {
+ iview->extent = (VkExtent3D) {
.width = anv_minify(image->extent.width, range->baseMipLevel),
.height = anv_minify(image->extent.height, range->baseMipLevel),
.depth = anv_minify(image->extent.depth, range->baseMipLevel),
@@ -588,7 +588,7 @@ anv_color_attachment_view_init(struct anv_color_attachment_view *aview,
view->offset = image->offset + surface->offset;
view->format = pCreateInfo->format;
- view->extent = (VkExtent3D) {
+ aview->base.extent = (VkExtent3D) {
.width = anv_minify(image->extent.width, pCreateInfo->mipLevel),
.height = anv_minify(image->extent.height, pCreateInfo->mipLevel),
.depth = anv_minify(image->extent.depth, pCreateInfo->mipLevel),
diff --git a/src/vulkan/meta.c b/src/vulkan/meta.c
index 8e2556b8218..30809581ad6 100644
--- a/src/vulkan/meta.c
+++ b/src/vulkan/meta.c
@@ -543,8 +543,8 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
dest_offset.y + dest_extent.height,
},
.tex_coord = {
- (float)(src_offset.x + src_extent.width) / (float)src->view.extent.width,
- (float)(src_offset.y + src_extent.height) / (float)src->view.extent.height,
+ (float)(src_offset.x + src_extent.width) / (float)src->extent.width,
+ (float)(src_offset.y + src_extent.height) / (float)src->extent.height,
},
};
@@ -554,8 +554,8 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
dest_offset.y + dest_extent.height,
},
.tex_coord = {
- (float)src_offset.x / (float)src->view.extent.width,
- (float)(src_offset.y + src_extent.height) / (float)src->view.extent.height,
+ (float)src_offset.x / (float)src->extent.width,
+ (float)(src_offset.y + src_extent.height) / (float)src->extent.height,
},
};
@@ -565,8 +565,8 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
dest_offset.y,
},
.tex_coord = {
- (float)src_offset.x / (float)src->view.extent.width,
- (float)src_offset.y / (float)src->view.extent.height,
+ (float)src_offset.x / (float)src->extent.width,
+ (float)src_offset.y / (float)src->extent.height,
},
};
@@ -622,8 +622,8 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
.layout = VK_IMAGE_LAYOUT_GENERAL
}
},
- .width = dest->view.extent.width,
- .height = dest->view.extent.height,
+ .width = dest->base.extent.width,
+ .height = dest->base.extent.height,
.layers = 1
}, &fb);
@@ -1274,8 +1274,8 @@ void anv_CmdClearColorImage(
.layout = VK_IMAGE_LAYOUT_GENERAL
}
},
- .width = view.view.extent.width,
- .height = view.view.extent.height,
+ .width = view.base.extent.width,
+ .height = view.base.extent.height,
.layers = 1
}, &fb);
@@ -1322,8 +1322,8 @@ void anv_CmdClearColorImage(
.renderArea = {
.offset = { 0, 0, },
.extent = {
- .width = view.view.extent.width,
- .height = view.view.extent.height,
+ .width = view.base.extent.width,
+ .height = view.base.extent.height,
},
},
.renderPass = pass,
diff --git a/src/vulkan/private.h b/src/vulkan/private.h
index 16ddaefc57e..ac64f294c2d 100644
--- a/src/vulkan/private.h
+++ b/src/vulkan/private.h
@@ -889,17 +889,16 @@ struct anv_surface_view {
struct anv_bo *bo;
uint32_t offset; /**< VkBufferCreateInfo::offset */
uint32_t range; /**< VkBufferCreateInfo::range */
- VkExtent3D extent;
VkFormat format; /**< VkBufferCreateInfo::format */
};
struct anv_buffer_view {
- /* FINISHME: Trim unneeded data from this struct. */
struct anv_surface_view view;
};
struct anv_image_view {
struct anv_surface_view view;
+ VkExtent3D extent;
};
enum anv_attachment_view_type {
@@ -909,11 +908,11 @@ enum anv_attachment_view_type {
struct anv_attachment_view {
enum anv_attachment_view_type attachment_type;
+ VkExtent3D extent;
};
struct anv_color_attachment_view {
struct anv_attachment_view base;
-
struct anv_surface_view view;
};