[Mesa-dev] [PATCH v2] anv: fix number of planes for depth & stencil

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Apr 16 14:47:59 UTC 2018


Thanks a lot Juan, it looks all good to me :)

On 16/04/18 04:09, Juan A. Suarez Romero wrote:
> On Thu, 2018-04-12 at 14:54 -0700, Lionel Landwerlin wrote:
>> We're not counting correctly with depth & stencil images.
>>
>> Additionally we need to move an assert that is meant just for color
>> attachments.
>>
>> v2: Move an assert() (Reported by Craig)
>>      Change aspect mask checks (Francesco)
>>
>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>> Fixes: a62a97933578a ("anv: enable multiple planes per image/imageView")
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105994
>
> Hi, Lionel!
>
> As this patch is fixing a commit that is part of 17.3 stable series, and due the
> next stable release, 17.3.9, is the last one for the series, I've cherry-picked
> this patch to include in the release.
>
> I solved some trivial conflicts, in case you want to verify them.
>
> https://github.com/Igalia/release-mesa/commit/48d627d14a09fc8d95e4df48761166c634
> a7b701
>
>
> 	J.A.
>
>> ---
>>   src/intel/vulkan/anv_private.h     | 4 ++++
>>   src/intel/vulkan/genX_cmd_buffer.c | 2 +-
>>   2 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
>> index 53115ae470f..52d4ba58dc9 100644
>> --- a/src/intel/vulkan/anv_private.h
>> +++ b/src/intel/vulkan/anv_private.h
>> @@ -2356,6 +2356,10 @@ anv_image_aspect_get_planes(VkImageAspectFlags aspect_mask)
>>      if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT)
>>         planes++;
>>   
>> +   if ((aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT) != 0 &&
>> +       (aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT) != 0)
>> +      planes++;
>> +
>>      return planes;
>>   }
>>   
>> diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
>> index 3c703f6be44..cbe623802e9 100644
>> --- a/src/intel/vulkan/genX_cmd_buffer.c
>> +++ b/src/intel/vulkan/genX_cmd_buffer.c
>> @@ -1248,13 +1248,13 @@ genX(cmd_buffer_setup_attachments)(struct anv_cmd_buffer *cmd_buffer,
>>   
>>            struct anv_image_view *iview = framebuffer->attachments[i];
>>            anv_assert(iview->vk_format == att->format);
>> -         anv_assert(iview->n_planes == 1);
>>   
>>            const uint32_t num_layers = iview->planes[0].isl.array_len;
>>            state->attachments[i].pending_clear_views = (1 << num_layers) - 1;
>>   
>>            union isl_color_value clear_color = { .u32 = { 0, } };
>>            if (att_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
>> +            anv_assert(iview->n_planes == 1);
>>               assert(att_aspects == VK_IMAGE_ASPECT_COLOR_BIT);
>>               color_attachment_compute_aux_usage(cmd_buffer->device,
>>                                                  state, i, begin->renderArea,
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list