aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_private.h
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-10-05 16:24:53 -0700
committerChad Versace <[email protected]>2015-10-05 17:46:04 -0700
commitf0f4dfa9cc1473c5e12eeeb9403f721d5611e905 (patch)
tree85bda7f2722d8499c7abccf423e0a633f340269e /src/vulkan/anv_private.h
parent74193a880f475da40e8c03ff7e772f3a288317a8 (diff)
vk: Drop anv_surface_view
Push the members of struct anv_surface_view into anv_image_view and anv_buffer_view, then remove struct anv_surface_view. Observe that anv_surface_view::range is not needed for anv_image_view, and so was dropped there. This prepares for the merge of VkAttachmentView into VkImageView. Remove the common parent of anv_buffer_view and anv_image_view (that is, anv_surface_view) will make the merge easier.
Diffstat (limited to 'src/vulkan/anv_private.h')
-rw-r--r--src/vulkan/anv_private.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h
index 09890730fd6..8c4c9efdc6f 100644
--- a/src/vulkan/anv_private.h
+++ b/src/vulkan/anv_private.h
@@ -730,14 +730,16 @@ struct anv_descriptor_set_layout {
enum anv_descriptor_type {
ANV_DESCRIPTOR_TYPE_EMPTY = 0,
+ ANV_DESCRIPTOR_TYPE_BUFFER_VIEW,
+ ANV_DESCRIPTOR_TYPE_IMAGE_VIEW,
ANV_DESCRIPTOR_TYPE_SAMPLER,
- ANV_DESCRIPTOR_TYPE_SURFACE_VIEW,
};
struct anv_descriptor {
union {
+ struct anv_buffer_view *buffer_view;
+ struct anv_image_view *image_view;
struct anv_sampler *sampler;
- struct anv_surface_view *surface_view;
};
enum anv_descriptor_type type;
@@ -1233,20 +1235,19 @@ struct anv_image {
};
};
-struct anv_surface_view {
+struct anv_buffer_view {
struct anv_state surface_state; /**< RENDER_SURFACE_STATE */
struct anv_bo *bo;
- uint32_t offset; /**< VkBufferCreateInfo::offset */
- uint32_t range; /**< VkBufferCreateInfo::range */
- const struct anv_format *format; /**< VkBufferCreateInfo::format */
-};
-
-struct anv_buffer_view {
- struct anv_surface_view surface_view;
+ uint32_t offset; /**< Offset into bo. */
+ uint32_t range; /**< VkBufferViewCreateInfo::range */
+ const struct anv_format *format; /**< VkBufferViewCreateInfo::format */
};
struct anv_image_view {
- struct anv_surface_view surface_view;
+ struct anv_state surface_state; /**< RENDER_SURFACE_STATE */
+ struct anv_bo *bo;
+ uint32_t offset; /**< Offset into bo. */
+ const struct anv_format *format; /**< VkImageViewCreateInfo::format */
VkExtent3D extent;
};
@@ -1262,7 +1263,7 @@ struct anv_attachment_view {
struct anv_color_attachment_view {
struct anv_attachment_view attachment_view;
- struct anv_surface_view surface_view;
+ struct anv_image_view image_view;
};
struct anv_depth_stencil_view {
@@ -1334,9 +1335,6 @@ void gen7_fill_buffer_surface_state(void *state, const struct anv_format *format
void gen8_fill_buffer_surface_state(void *state, const struct anv_format *format,
uint32_t offset, uint32_t range);
-void anv_surface_view_fini(struct anv_device *device,
- struct anv_surface_view *sview);
-
struct anv_sampler {
uint32_t state[4];
};