[Mesa-dev] [PATCH 19/64] isl/state: Set SurfaceArray based on the surface dimension
Jason Ekstrand
jason at jlekstrand.net
Sat Jun 11 16:02:34 UTC 2016
According to the PRM, you can't set SurfaceArray for 3D or buffer textures.
There doesn't seem to be a good reason not to set it when we can. On the
other hand, if we don't set it we can end up getting strange results for
1-layer array textures such as textureSize() returning the wrong results.
---
src/intel/isl/isl_surface_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 60bfced..35902e6 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -257,7 +257,7 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
unreachable("bad SurfaceType");
}
- s.SurfaceArray = info->surf->phys_level0_sa.array_len > 1;
+ s.SurfaceArray = info->surf->dim != ISL_SURF_DIM_3D;
if (info->view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {
/* For render target surfaces, the hardware interprets field
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list