summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-11-03 14:08:44 -0800
committerChad Versace <[email protected]>2015-11-04 15:15:19 -0800
commitc56727037a968c3ff433468827eff25a40f26a71 (patch)
treef59d71294a9d448666621347608267ec1857c680
parentb00e3f221b3f6dd0e87697c53331fd033b6e8676 (diff)
anv: Move struct anv_vue_header to anv_private.h
Move it from anv_meta.c to the common header anv_private.h. This allows us to split the meta blit and meta clear code into separate files.
-rw-r--r--src/vulkan/anv_meta.c17
-rw-r--r--src/vulkan/anv_private.h10
2 files changed, 15 insertions, 12 deletions
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c
index cc605197f9b..f6b37c3f8b2 100644
--- a/src/vulkan/anv_meta.c
+++ b/src/vulkan/anv_meta.c
@@ -353,15 +353,8 @@ anv_cmd_buffer_restore(struct anv_cmd_buffer *cmd_buffer,
cmd_buffer->state.dirty |= state->dynamic_flags;
}
-struct vue_header {
- uint32_t Reserved;
- uint32_t RTAIndex;
- uint32_t ViewportIndex;
- float PointWidth;
-};
-
struct clear_instance_data {
- struct vue_header vue_header;
+ struct anv_vue_header vue_header;
VkClearColorValue color;
};
@@ -807,12 +800,12 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
float tex_coord[3];
} *vb_data;
- unsigned vb_size = sizeof(struct vue_header) + 3 * sizeof(*vb_data);
+ unsigned vb_size = sizeof(struct anv_vue_header) + 3 * sizeof(*vb_data);
struct anv_state vb_state =
anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, vb_size, 16);
- memset(vb_state.map, 0, sizeof(struct vue_header));
- vb_data = vb_state.map + sizeof(struct vue_header);
+ memset(vb_state.map, 0, sizeof(struct anv_vue_header));
+ vb_data = vb_state.map + sizeof(struct anv_vue_header);
vb_data[0] = (struct blit_vb_data) {
.pos = {
@@ -864,7 +857,7 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer,
},
(VkDeviceSize[]) {
0,
- sizeof(struct vue_header),
+ sizeof(struct anv_vue_header),
});
VkDescriptorSet set;
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h
index 8e921afb5fb..089bf0b79ed 100644
--- a/src/vulkan/anv_private.h
+++ b/src/vulkan/anv_private.h
@@ -672,6 +672,16 @@ struct anv_device_memory {
void * map;
};
+/**
+ * Header for Vertex URB Entry (VUE)
+ */
+struct anv_vue_header {
+ uint32_t Reserved;
+ uint32_t RTAIndex; /* RenderTargetArrayIndex */
+ uint32_t ViewportIndex;
+ float PointWidth;
+};
+
struct anv_descriptor_set_binding_layout {
/* Number of array elements in this binding */
uint16_t array_size;