diff options
author | Jason Ekstrand <[email protected]> | 2017-11-27 18:06:47 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-02-08 16:35:31 -0800 |
commit | 3ef8c4b2f53e00701375597aaaef9fc9617d7b4d (patch) | |
tree | 98c917687e9e1ac240101612bdb83cad14af646a | |
parent | 857b5b5a7f7741b5433c59814c66d0612c05ae7d (diff) |
anv/cmd_buffer: Pull the undefined layout condition into the if
Now that this isn't a multi-case if and it's just the one case, it's a
bit clearer if the condition is just part of the if instead of being
pulled out into a boolean variable.
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index fee1876ce41..d3449f5b334 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -662,20 +662,15 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer, anv_image_aux_layers(image, aspect, base_level) - base_layer); last_level_num = base_level + level_count; - /* Record whether or not the layout is undefined. Pre-initialized images - * with auxiliary buffers have a non-linear layout and are thus undefined. - */ assert(image->tiling == VK_IMAGE_TILING_OPTIMAL); - const bool undef_layout = initial_layout == VK_IMAGE_LAYOUT_UNDEFINED || - initial_layout == VK_IMAGE_LAYOUT_PREINITIALIZED; - /* Do preparatory work before the resolve operation or return early if no - * resolve is actually needed. - */ - if (undef_layout) { + if (initial_layout == VK_IMAGE_LAYOUT_UNDEFINED || + initial_layout == VK_IMAGE_LAYOUT_PREINITIALIZED) { /* A subresource in the undefined layout may have been aliased and * populated with any arrangement of bits. Therefore, we must initialize * the related aux buffer and clear buffer entry with desirable values. + * An initial layout of PREINITIALIZED is the same as UNDEFINED for + * images with VK_IMAGE_TILING_OPTIMAL. * * Initialize the relevant clear buffer entries. */ |