[Mesa-dev] [PATCH] i965: Fix calculation of layers array length for isl_view

Józef Kucia joseph.kucia at gmail.com
Fri Sep 7 16:35:09 UTC 2018


On Fri, Sep 7, 2018 at 4:42 PM Danylo Piliaiev
<danylo.piliaiev at gmail.com> wrote:

> @@ -1546,8 +1548,8 @@ update_image_surface(struct brw_context *brw,
>              .format = format,
>              .base_level = obj->MinLevel + u->Level,
>              .levels = 1,
> -            .base_array_layer = obj->MinLayer + u->_Layer,
> -            .array_len = num_layers,
> +            .base_array_layer = base_layer,
> +            .array_len = num_layers - base_layer,
>              .swizzle = ISL_SWIZZLE_IDENTITY,
>              .usage = ISL_SURF_USAGE_STORAGE_BIT,
>           };

This sets the "array_len" to the number of layers remaining in the
original texture. Shouldn't it take into account the number of layers
in the GL texture view?


More information about the mesa-dev mailing list