diff options
author | Jason Ekstrand <[email protected]> | 2018-06-26 09:22:20 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-07-09 10:11:53 -0700 |
commit | 208be8eafa30be6c5e79fe3235f5404fd803baf1 (patch) | |
tree | 6a2e335488b896df7b3a52c36f5111c29e14ce1c /src/intel/vulkan/genX_pipeline.c | |
parent | 75e308fc44a02e80e6c83b7bbe5266b01cea1fce (diff) |
anv: Make subpass::depth_stencil_attachment a pointer
This makes certain checks a bit easier and means that we don't have
the attachment information duplicated in the attachment list and in
depth_stencil_attachment.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 3e9c4bbc21e..70097e46285 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -499,9 +499,9 @@ emit_rs_state(struct anv_pipeline *pipeline, /* Gen7 requires that we provide the depth format in 3DSTATE_SF so that it * can get the depth offsets correct. */ - if (subpass->depth_stencil_attachment.attachment < pass->attachment_count) { + if (subpass->depth_stencil_attachment) { VkFormat vk_format = - pass->attachments[subpass->depth_stencil_attachment.attachment].format; + pass->attachments[subpass->depth_stencil_attachment->attachment].format; assert(vk_format_is_depth_or_stencil(vk_format)); if (vk_format_aspects(vk_format) & VK_IMAGE_ASPECT_DEPTH_BIT) { enum isl_format isl_format = @@ -816,9 +816,9 @@ emit_ds_state(struct anv_pipeline *pipeline, } VkImageAspectFlags ds_aspects = 0; - if (subpass->depth_stencil_attachment.attachment != VK_ATTACHMENT_UNUSED) { + if (subpass->depth_stencil_attachment) { VkFormat depth_stencil_format = - pass->attachments[subpass->depth_stencil_attachment.attachment].format; + pass->attachments[subpass->depth_stencil_attachment->attachment].format; ds_aspects = vk_format_aspects(depth_stencil_format); } |