[Mesa-dev] [PATCH] i965/gen8: Allow 16k viewport when blitting stencil
From: Topi Pohjolainen Fixes gles3 conformance tests: framebuffer_blit_functionality_negative_height_blit framebuffer_blit_functionality_negative_width_blit framebuffer_blit_functionality_negative_dimensions_blit framebuffer_blit_functionality_magnifying_blit framebuffer_blit_functionality_multisampled_to_singlesampled_blit Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/gen8_viewport_state.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/i965/gen8_viewport_state.c b/src/mesa/drivers/dri/i965/gen8_viewport_state.c index 9c89532..eda9aad 100644 --- a/src/mesa/drivers/dri/i965/gen8_viewport_state.c +++ b/src/mesa/drivers/dri/i965/gen8_viewport_state.c @@ -94,6 +94,13 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw) float gbx = maximum_guardband_extent / ctx->ViewportArray[i].Width; float gby = maximum_guardband_extent / ctx->ViewportArray[i].Height; + /** + * Stencil blits require W-tiled to be treated as Y-tiled needing in + * turn width to be programmed twice the original. + */ + if (brw->meta_in_progress) + gbx *= 2; + /* _NEW_VIEWPORT: Guardband Clipping */ vp[8] = -gbx; /* x-min */ vp[9] = gbx; /* x-max */ -- 1.9.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965/gen8: Allow 16k viewport when blitting stencil
I've added this patch to my gles3conform-v5 and gles3conform-v6-wip branches. On 08/14/2014 09:09 AM, Topi Pohjolainen wrote: > From: Topi Pohjolainen > > Fixes gles3 conformance tests: > > framebuffer_blit_functionality_negative_height_blit > framebuffer_blit_functionality_negative_width_blit > framebuffer_blit_functionality_negative_dimensions_blit > framebuffer_blit_functionality_magnifying_blit > framebuffer_blit_functionality_multisampled_to_singlesampled_blit > > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/gen8_viewport_state.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > index 9c89532..eda9aad 100644 > --- a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > +++ b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > @@ -94,6 +94,13 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw) >float gbx = maximum_guardband_extent / ctx->ViewportArray[i].Width; >float gby = maximum_guardband_extent / ctx->ViewportArray[i].Height; > > + /** > + * Stencil blits require W-tiled to be treated as Y-tiled needing in > + * turn width to be programmed twice the original. > + */ > + if (brw->meta_in_progress) > + gbx *= 2; > + >/* _NEW_VIEWPORT: Guardband Clipping */ >vp[8] = -gbx; /* x-min */ >vp[9] = gbx; /* x-max */ > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965/gen8: Allow 16k viewport when blitting stencil
On Thu, Aug 14, 2014 at 9:09 AM, Topi Pohjolainen < topi.pohjolai...@intel.com> wrote: > From: Topi Pohjolainen > > Fixes gles3 conformance tests: > > framebuffer_blit_functionality_negative_height_blit > framebuffer_blit_functionality_negative_width_blit > framebuffer_blit_functionality_negative_dimensions_blit > framebuffer_blit_functionality_magnifying_blit > framebuffer_blit_functionality_multisampled_to_singlesampled_blit > > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/gen8_viewport_state.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > index 9c89532..eda9aad 100644 > --- a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > +++ b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > @@ -94,6 +94,13 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw) >float gbx = maximum_guardband_extent / ctx->ViewportArray[i].Width; >float gby = maximum_guardband_extent / ctx->ViewportArray[i].Height; > > + /** > + * Stencil blits require W-tiled to be treated as Y-tiled needing in > + * turn width to be programmed twice the original. > + */ > + if (brw->meta_in_progress) > + gbx *= 2; > + >/* _NEW_VIEWPORT: Guardband Clipping */ >vp[8] = -gbx; /* x-min */ >vp[9] = gbx; /* x-max */ > -- > 1.9.1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev Tested-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965/gen8: Allow 16k viewport when blitting stencil
On 08/14/2014 09:09 AM, Topi Pohjolainen wrote: > From: Topi Pohjolainen > > Fixes gles3 conformance tests: > > framebuffer_blit_functionality_negative_height_blit > framebuffer_blit_functionality_negative_width_blit > framebuffer_blit_functionality_negative_dimensions_blit > framebuffer_blit_functionality_magnifying_blit > framebuffer_blit_functionality_multisampled_to_singlesampled_blit > > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/gen8_viewport_state.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > index 9c89532..eda9aad 100644 > --- a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > +++ b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > @@ -94,6 +94,13 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw) >float gbx = maximum_guardband_extent / ctx->ViewportArray[i].Width; >float gby = maximum_guardband_extent / ctx->ViewportArray[i].Height; > > + /** > + * Stencil blits require W-tiled to be treated as Y-tiled needing in > + * turn width to be programmed twice the original. > + */ > + if (brw->meta_in_progress) > + gbx *= 2; > + I've had this on my various trees for almost two weeks now, and it doesn't seem to have caused any problems. I'm wondering if we want to make this check a bit more specific to the stencil blit case. Either way, I'd like to see this or something similar land soon. >/* _NEW_VIEWPORT: Guardband Clipping */ >vp[8] = -gbx; /* x-min */ >vp[9] = gbx; /* x-max */ > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965/gen8: Allow 16k viewport when blitting stencil
On Monday, August 25, 2014 04:38:53 PM Ian Romanick wrote: > On 08/14/2014 09:09 AM, Topi Pohjolainen wrote: > > From: Topi Pohjolainen > > > > Fixes gles3 conformance tests: > > > > framebuffer_blit_functionality_negative_height_blit > > framebuffer_blit_functionality_negative_width_blit > > framebuffer_blit_functionality_negative_dimensions_blit > > framebuffer_blit_functionality_magnifying_blit > > framebuffer_blit_functionality_multisampled_to_singlesampled_blit > > > > Signed-off-by: Topi Pohjolainen > > --- > > src/mesa/drivers/dri/i965/gen8_viewport_state.c | 7 +++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > > b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > > index 9c89532..eda9aad 100644 > > --- a/src/mesa/drivers/dri/i965/gen8_viewport_state.c > > +++ b/src/mesa/drivers/dri/i965/gen8_viewport_state.c > > @@ -94,6 +94,13 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw) > >float gbx = maximum_guardband_extent / ctx->ViewportArray[i].Width; > >float gby = maximum_guardband_extent / ctx->ViewportArray[i].Height; > > > > + /** > > + * Stencil blits require W-tiled to be treated as Y-tiled needing in > > + * turn width to be programmed twice the original. > > + */ > > + if (brw->meta_in_progress) > > + gbx *= 2; > > + > > I've had this on my various trees for almost two weeks now, and it > doesn't seem to have caused any problems. I'm wondering if we want to > make this check a bit more specific to the stencil blit case. > > Either way, I'd like to see this or something similar land soon. NAK. While it does appear to fix the problem, this seems much too broad to me - there are plenty of meta operations that don't even touch W-tiled buffers. This also expands the guardband to be 16K x 8K, which (as I understand it), would result in TA_GB for a primitive with a screenspace bounding box wider than 8K pixels. This could mean such primitives get trivially accepted, which violates the rule in the vertex X,Y quantization section that all primitives must have width/height <= 8K, which explicitly states that software must guarantee that via clipping. I have an alternate patch which should fix the problem a bit differently, and likely some other issues we'll hit if/when we bump the maximum texture size to 16K: http://mid.gmane.org/1409096395-19654-1-git-send-email-kenn...@whitecape.org --Ken signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev