diff options
author | Jason Ekstrand <[email protected]> | 2016-09-12 08:18:53 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-09-12 16:52:10 -0700 |
commit | 24be6306609179efddfb7e5cc6ec5d6a335c9b88 (patch) | |
tree | bdfcbd350332a352e63dd368237953e63fdbea0f /src/mesa | |
parent | 2519237c2495adb9564062eed6b9cd225b886dc0 (diff) |
Revert "i965: Drop the maximum 3D texture size to 512 on Sandy Bridge"
This reverts commit 6ba88bce64b343761aabe3a6c7ee285c6020a959. The commit
was erroneous because GL has a separate limit, GL_MAX_FRAMEBUFFER_LAYERS
which guards the number of layers you are allowed to render into.
The GL 4.5 spec says:
"The framebuffer attachment point attachment is said to be framebuffer
attachment complete if [...] all of the following conditions are true:
[...]
If image is a three-dimensional, one- or two-dimensional array, or
cube map array texture and the attachment is layered, the depth or
layer count of the texture is less than or equal to the value of the
implementation-dependent limit MAX_FRAMEBUFFER_LAYERS."
and goes on to say that "framebuffer complete" requires all attachments to
be "framebuffer attachment complete".
On Sandy Bridge, we set GL_MAX_FRAMEBUFFER_LAYERS to 512 so creating a 3D
texture bigger than 512 is fine; you just can't render into all of the
slices at once.
Fixes ES3-CTS.gtf.GL3Tests.npot_textures.npot_tex_image on Sandy Bridge
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index c28401a6de0..3af45551e99 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -524,16 +524,7 @@ brw_initialize_context_constants(struct brw_context *brw) ctx->Const.MaxImageUnits = MAX_IMAGE_UNITS; ctx->Const.MaxRenderbufferSize = 8192; ctx->Const.MaxTextureLevels = MIN2(14 /* 8192 */, MAX_TEXTURE_LEVELS); - - /* On Sandy Bridge and prior, the "Render Target View Extent" field of - * RENDER_SURFACE_STATE is only 9 bits so the largest 3-D texture we can do - * a layered render into has a depth of 512. On Iron Lake and earlier, we - * don't support layered rendering and we use manual offsetting to render - * into the different layers so this doesn't matter. On Sandy Bridge, - * however, we do support layered rendering so this is a problem. - */ - ctx->Const.Max3DTextureLevels = brw->gen == 6 ? 10 /* 512 */ : 12; /* 2048 */ - + ctx->Const.Max3DTextureLevels = 12; /* 2048 */ ctx->Const.MaxCubeTextureLevels = 14; /* 8192 */ ctx->Const.MaxArrayTextureLayers = brw->gen >= 7 ? 2048 : 512; ctx->Const.MaxTextureMbytes = 1536; |