On Mon 12 Sep 2016, Kenneth Graunke wrote: > On Monday, September 12, 2016 3:16:31 PM PDT Jason Ekstrand wrote: > > This reverts commit 6ba88bce64b343761aabe3a6c7ee285c6020a959. The commit > > was erroneous because GL already provides a separate guard on the number of > > layers you are allowed to render into. On Sandy Bridge, we set this guard > > correctly so creating a 3D texture bigger than 512 is fine, you just can't > > render into all of the slices at once. > > > > Signed-off-by: Jason Ekstrand <[email protected]> > > --- > > src/mesa/drivers/dri/i965/brw_context.c | 11 +---------- > > 1 file changed, 1 insertion(+), 10 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/i965/brw_context.c > > b/src/mesa/drivers/dri/i965/brw_context.c > > index c28401a..3af4555 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; > > > > To clarify...that limit is GL_MAX_FRAMEBUFFER_LAYERS.
Good. If the limit is GL_MAX_FRAMEBUFFER_LAYERS, then I agree with this patch. Reviewed-by: Chad Versace <[email protected]> _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
