[Mesa-dev] [PATCH 7/8] i965: Added support for ETC2 texture arrays on Gen7
Eleni Maria Stea
estea at igalia.com
Mon Nov 19 08:54:11 UTC 2018
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.
---
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
More information about the mesa-dev
mailing list