diff options
author | Jason Ekstrand <[email protected]> | 2016-06-07 15:30:00 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-06-22 12:26:43 -0700 |
commit | bb326f7b01daeb97e544873f20a23614ed54c548 (patch) | |
tree | 7f149e0f980bb0f15ef201f786a83f8bc535389b /src/intel | |
parent | d050ffbce950f8ececd12200145eb209819a421e (diff) |
isl/state: Set SurfaceArray based on the surface dimension
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.
Reviewed-by: Chad Versace <[email protected]>
Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/isl/isl_surface_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 89fd69d877f..602726a436a 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -258,7 +258,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 |