[Mesa-dev] [PATCH v2 7/7] i965: Increase max texture to 16k for gen7+
Jason Ekstrand
jason at jlekstrand.net
Wed Dec 7 17:52:22 UTC 2016
This has some interesting implications...
>From the Sky Lake PRM, Vol 7, section "Vertex XY Clamping and Quantization",
> In addition, in order to be correctly rendered, objects must have a
screenspace
> bounding box not exceeding 8K in the X or Y direction. This additional
restriction
> must also be comprehended by software, i.e., enforced by use of clipping.
This seems to imply that you can't render a single primitive that's larger
than 8K which would imply that you can't really have a render target that
large. The text dates back to at least Sandy Bridge so it may be
out-of-date.
I did a little archaeology and found out that, in January of 2013, commit
416326e33, Eric updated our guardband settings to follow this rule to fix a
GTF clip test on Ivy Bridge. In August of 2014, commit 0bac2551e4041, Ken
disabled the guardband clip test for the case where the viewport is larger
than the guardband to fix some ES3 conformance tests. Given my (admittedly
a bit shaky) understanding of clipping, both of these make sense in a world
with 8Kx8K framebuffers but not with 16Kx16K given the PRM text.
Have you run the CTS at 16Kx16K yet? Have you seen any issues doing so?
On Wed, Nov 30, 2016 at 8:12 PM, Jordan Justen <jordan.l.justen at intel.com>
wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98297
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> src/mesa/drivers/dri/i965/brw_context.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c
> b/src/mesa/drivers/dri/i965/brw_context.c
> index b928f94..4ca77c7 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -527,14 +527,21 @@ brw_initialize_context_constants(struct brw_context
> *brw)
>
> ctx->Const.MaxTextureCoordUnits = 8; /* Mesa limit */
> ctx->Const.MaxImageUnits = MAX_IMAGE_UNITS;
> - ctx->Const.MaxRenderbufferSize = 8192;
> - ctx->Const.MaxTextureLevels = MIN2(14 /* 8192 */, MAX_TEXTURE_LEVELS);
> + if (brw->gen >= 7) {
> + ctx->Const.MaxRenderbufferSize = 16384;
> + ctx->Const.MaxTextureLevels = MIN2(15 /* 16384 */,
> MAX_TEXTURE_LEVELS);
> + ctx->Const.MaxCubeTextureLevels = 15; /* 16384 */
> + } else {
> + ctx->Const.MaxRenderbufferSize = 8192;
> + ctx->Const.MaxTextureLevels = MIN2(14 /* 8192 */,
> MAX_TEXTURE_LEVELS);
> + ctx->Const.MaxCubeTextureLevels = 14; /* 8192 */
> + }
> ctx->Const.Max3DTextureLevels = 12; /* 2048 */
> - ctx->Const.MaxCubeTextureLevels = 14; /* 8192 */
> ctx->Const.MaxArrayTextureLayers = brw->gen >= 7 ? 2048 : 512;
> ctx->Const.MaxTextureMbytes = 1536;
> ctx->Const.MaxTextureRectSize = 1 << 12;
> ctx->Const.MaxTextureMaxAnisotropy = 16.0;
> + ctx->Const.MaxTextureLodBias = 15.0;
> ctx->Const.StripTextureBorder = true;
> if (brw->gen >= 7) {
> ctx->Const.MaxProgramTextureGatherComponents = 4;
> --
> 2.10.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161207/e9b38c96/attachment.html>
More information about the mesa-dev
mailing list