diff options
author | Chad Versace <[email protected]> | 2016-01-13 11:28:35 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-01-14 22:53:05 -0800 |
commit | a4b045ca44fb8210537e5a2b7c772f836be20e97 (patch) | |
tree | 10973e52537458fda36e4bc36c5ce2fc17fb2006 /src/vulkan/anv_private.h | |
parent | 5d1c2736b6eae9bab1a66cc22197d053de3444a7 (diff) |
anv: Add anv_cmd_state::attachments
This array contains attachment state when recording a renderpass instance.
It's populated on each call to anv_cmd_buffer_set_pass.
The data is currently set but unused. We'll use it later to defer each
attachment clear to the subpass that first uses the attachment.
Diffstat (limited to 'src/vulkan/anv_private.h')
-rw-r--r-- | src/vulkan/anv_private.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 1065f8a7359..f3232c69029 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -1059,6 +1059,16 @@ void anv_dynamic_state_copy(struct anv_dynamic_state *dest, const struct anv_dynamic_state *src, uint32_t copy_mask); +/** + * Attachment state when recording a renderpass instance. + * + * The clear value is valid only if there exists a pending clear. + */ +struct anv_attachment_state { + VkImageAspectFlags pending_clear_aspects; + VkClearValue clear_value; +}; + /** State required while building cmd buffer */ struct anv_cmd_state { /* PIPELINE_SELECT.PipelineSelection */ @@ -1085,6 +1095,12 @@ struct anv_cmd_state { struct anv_dynamic_state dynamic; bool need_query_wa; + /** + * Array length is anv_cmd_state::pass::attachment_count. Array content is + * valid only when recording a render pass instance. + */ + struct anv_attachment_state * attachments; + struct { struct anv_buffer * index_buffer; uint32_t index_type; /**< 3DSTATE_INDEX_BUFFER.IndexFormat */ @@ -1214,6 +1230,8 @@ void gen9_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer); void anv_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer); +void anv_cmd_state_setup_attachments(struct anv_cmd_buffer *cmd_buffer, + const VkRenderPassBeginInfo *info); void gen7_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer, struct anv_subpass *subpass); |