[Mesa-dev] [PATCH 29/64] isl/state: Allow for full 31-bit buffer texture sizes

Jason Ekstrand jason at jlekstrand.net
Sat Jun 11 16:02:44 UTC 2016


Ivy Bridge and above can handle up to 2^31 elements for RAW buffer
surfaces.
---
 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 2026f80..4c6563a 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -436,7 +436,7 @@ isl_genX(buffer_fill_state_s)(void *state,
    s.SurfaceHorizontalAlignment = isl_to_gen_halign[4],
    s.Height = ((num_elements - 1) >> 7) & 0x3fff,
    s.Width = (num_elements - 1) & 0x7f,
-   s.Depth = ((num_elements - 1) >> 21) & 0x3f,
+   s.Depth = ((num_elements - 1) >> 21) & 0x3ff,
    s.SurfacePitch = info->stride - 1,
    s.NumberofMultisamples = MULTISAMPLECOUNT_1,
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list