[Mesa-dev] [PATCH 7/8] i965: Added support for ETC2 texture arrays on Gen7
Nanley Chery
nanleychery at gmail.com
Fri Jan 18 23:52:17 UTC 2019
On Mon, Nov 19, 2018 at 10:54:11AM +0200, Eleni Maria Stea wrote:
> Modified the calculation of the number of slices in the
> intel_update_decompressed_shadow function to take the array length into
> account to support arrays.
> ---
At this point, we can delete map_etc and unmap_etc, right?
-Nanley
> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 4886bb2b96..0840b3b243 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -3965,6 +3965,8 @@ intel_update_decompressed_shadow(struct brw_context *brw,
> int level_w = img_w;
> int level_h = img_h;
>
> + int num_slices = img_d * smt->surf.logical_level0_px.array_len;
> +
> for (int level = smt->first_level; level <= smt->last_level; level++) {
> ptrdiff_t shadow_stride = _mesa_format_row_stride(smt->format,
> level_w);
> @@ -3972,7 +3974,7 @@ intel_update_decompressed_shadow(struct brw_context *brw,
> ptrdiff_t main_stride = _mesa_format_row_stride(mt->format,
> level_w);
>
> - for (unsigned int slice = 0; slice < img_d; slice++) {
> + for (unsigned int slice = 0; slice < num_slices; slice++) {
> GLbitfield mmode = GL_MAP_READ_BIT | BRW_MAP_DIRECT_BIT |
> BRW_MAP_ETC_BIT;
> GLbitfield smode = GL_MAP_WRITE_BIT |
> --
> 2.19.0
>
> _______________________________________________
> 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