[Mesa-dev] [PATCH 2/2] anv/image: fix offset's alignment to the surface alignment

Jason Ekstrand jason at jlekstrand.net
Tue Feb 19 04:00:36 UTC 2019


This confuses me. When is this ever a problem?  I suspect that we're doing 
something wing with alignments now.

--Jason

On February 18, 2019 09:02:39 Lionel Landwerlin 
<lionel.g.landwerlin at intel.com> wrote:

> On 15/02/2019 14:43, Samuel Iglesias Gonsálvez wrote:
>> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
>
>
> Hey Samuel,
>
>
> Thanks for this change. Would you mind changing the align_u32 in the
> if() branch too?
>
> It won't fix anything but that's just to be consistent.
>
>
> With that :
>
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>
>
>> ---
>>   src/intel/vulkan/anv_image.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
>> index 3999c7399d0..f4a65044a3b 100644
>> --- a/src/intel/vulkan/anv_image.c
>> +++ b/src/intel/vulkan/anv_image.c
>> @@ -142,7 +142,7 @@ add_surface(struct anv_image *image, struct anv_surface 
>> *surf, uint32_t plane)
>>                                  surf->isl.alignment_B);
>>         /* Plane offset is always 0 when it's disjoint. */
>>      } else {
>> -      surf->offset = align_u32(image->size, surf->isl.alignment_B);
>> +      surf->offset = util_align_npot(image->size, surf->isl.alignment_B);
>>         /* Determine plane's offset only once when the first surface is added. */
>>         if (image->planes[plane].size == 0)
>>            image->planes[plane].offset = image->size;
>
>
> _______________________________________________
> 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