diff options
author | Nanley Chery <[email protected]> | 2017-06-12 11:26:47 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2017-06-26 11:09:12 -0700 |
commit | 5f4f50419cc351b9cb55118d970885d96e4ac254 (patch) | |
tree | 08a4066a1301f7e067e3dbf4f804cbd3a20735b8 /src/intel/vulkan | |
parent | bc838fc759dd268aebf31f91daf6c18ce76610ee (diff) |
anv/cmd_buffer: Adjust layout transition aspect checking
Reflect the fact that an image view or subresource range with the color
aspect cannot have any other aspect.
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 0216ea04a80..69b48121855 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -992,9 +992,8 @@ void genX(CmdPipelineBarrier)( transition_depth_buffer(cmd_buffer, image, pImageMemoryBarriers[i].oldLayout, pImageMemoryBarriers[i].newLayout); - } - if (pImageMemoryBarriers[i].subresourceRange.aspectMask & - VK_IMAGE_ASPECT_COLOR_BIT) { + } else if (pImageMemoryBarriers[i].subresourceRange.aspectMask == + VK_IMAGE_ASPECT_COLOR_BIT) { transition_color_buffer(cmd_buffer, image, pImageMemoryBarriers[i].oldLayout, pImageMemoryBarriers[i].newLayout, @@ -2484,8 +2483,7 @@ cmd_buffer_subpass_transition_layouts(struct anv_cmd_buffer * const cmd_buffer, att_state->aux_usage = anv_layout_to_aux_usage(&cmd_buffer->device->info, image, image->aspects, target_layout); - } - if (image->aspects & VK_IMAGE_ASPECT_COLOR_BIT) { + } else if (image->aspects == VK_IMAGE_ASPECT_COLOR_BIT) { transition_color_buffer(cmd_buffer, image, att_state->current_layout, target_layout, &iview->isl, NULL); |