diff options
author | Jason Ekstrand <[email protected]> | 2016-03-07 17:28:00 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-08 15:40:11 -0800 |
commit | cce65471b8667e1752754c53361031cded5b39d1 (patch) | |
tree | 178546b008cbd296c8a3e21a617f8e5404c35add /src/intel/vulkan/anv_private.h | |
parent | 75af420cb1145f5fc34af6728047a2404b5f1add (diff) |
anv: Compact render targets
Previously, we would always emit all of the render targets in the subpass.
This commit changes it so that we compact render targets just like we do
with other resources. Render targets are represented in the surface map by
using a descriptor set index of UINT16_MAX.
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 7791bbc1649..f24ea20115b 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -995,11 +995,16 @@ anv_descriptor_set_destroy(struct anv_device *device, struct anv_descriptor_pool *pool, struct anv_descriptor_set *set); +#define ANV_DESCRIPTOR_SET_COLOR_ATTACHMENTS UINT16_MAX + struct anv_pipeline_binding { - /* The descriptor set this surface corresponds to */ + /* The descriptor set this surface corresponds to. The special value of + * ANV_DESCRIPTOR_SET_COLOR_ATTACHMENTS indicates that the offset refers + * to a color attachment and not a regular descriptor. + */ uint16_t set; - /* Offset into the descriptor set */ + /* Offset into the descriptor set or attachment list. */ uint16_t offset; }; @@ -1404,9 +1409,11 @@ struct anv_pipeline_bind_map { uint32_t surface_count; uint32_t sampler_count; uint32_t image_count; + uint32_t attachment_count; struct anv_pipeline_binding * surface_to_descriptor; struct anv_pipeline_binding * sampler_to_descriptor; + uint32_t * surface_to_attachment; }; struct anv_pipeline { |