summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen7_cmd_buffer.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-06-26 09:22:20 -0700
committerJason Ekstrand <[email protected]>2018-07-09 10:11:53 -0700
commit208be8eafa30be6c5e79fe3235f5404fd803baf1 (patch)
tree6a2e335488b896df7b3a52c36f5111c29e14ce1c /src/intel/vulkan/gen7_cmd_buffer.c
parent75e308fc44a02e80e6c83b7bbe5266b01cea1fce (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/gen7_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/gen7_cmd_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/gen7_cmd_buffer.c b/src/intel/vulkan/gen7_cmd_buffer.c
index aa4dcde46b9..3acfbb710c0 100644
--- a/src/intel/vulkan/gen7_cmd_buffer.c
+++ b/src/intel/vulkan/gen7_cmd_buffer.c
@@ -127,11 +127,11 @@ get_depth_format(struct anv_cmd_buffer *cmd_buffer)
const struct anv_render_pass *pass = cmd_buffer->state.pass;
const struct anv_subpass *subpass = cmd_buffer->state.subpass;
- if (subpass->depth_stencil_attachment.attachment >= pass->attachment_count)
+ if (!subpass->depth_stencil_attachment)
return D16_UNORM;
struct anv_render_pass_attachment *att =
- &pass->attachments[subpass->depth_stencil_attachment.attachment];
+ &pass->attachments[subpass->depth_stencil_attachment->attachment];
switch (att->format) {
case VK_FORMAT_D16_UNORM: