[Mesa-dev] [PATCH V2] i965: enable STD430 packing by default on IVB+

Jason Ekstrand jason at jlekstrand.net
Fri Aug 18 05:36:27 UTC 2017


On August 17, 2017 7:04:20 PM Timothy Arceri <tarceri at itsqueeze.com> wrote:

> v2: Add full description of the SNB issue to the TODO.
> ---
>  src/mesa/drivers/dri/i965/brw_context.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c 
> b/src/mesa/drivers/dri/i965/brw_context.c
> index d97a24fbf8..11cb2f7226 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -668,20 +668,32 @@ brw_initialize_context_constants(struct brw_context *brw)
>        ctx->Const.MaxVertexStreams = MIN2(4, MAX_VERTEX_STREAMS);
>
>     /* ARB_framebuffer_no_attachments */
>     ctx->Const.MaxFramebufferWidth = 16384;
>     ctx->Const.MaxFramebufferHeight = 16384;
>     ctx->Const.MaxFramebufferLayers = ctx->Const.MaxArrayTextureLayers;
>     ctx->Const.MaxFramebufferSamples = max_samples;
>
>     /* OES_primitive_bounding_box */
>     ctx->Const.NoPrimitiveBoundingBoxOutput = true;
> +
> +   /* TODO: We should be able to use STD430 packing by default on all hardware
> +    * but some piglit tests e.g. [1] currently fail on SNB when this is
> +    * enabled. The problem is the messages we're using for doing uniform pulls
> +    * in the vec4 back-end on SNB is the OWORD block load instruction, whoosh
> +    * takes its offset in units of OWORDS (16 bytes).  On IVB+, we use the
> +    * sampler which doesn't have these restrictions.

I would add one more line here:

In the scalar back-end, we use the sampler for dynamic uniform loads and 
pull an entire cache line at a time for constant offset loads both of which 
support almost any alignment.

With that,

Reciewed-by: Jason Ekstrand <jason at jlekstrand.net>

> +    *
> +    * [1] glsl-1.40/uniform_buffer/vs-float-array-variable-index.shader_test
> +    */
> +   if (brw->gen >= 7)
> +      ctx->Const.UseSTD430AsDefaultPacking = true;
>  }
>
>  static void
>  brw_initialize_cs_context_constants(struct brw_context *brw)
>  {
>     struct gl_context *ctx = &brw->ctx;
>     const struct intel_screen *screen = brw->screen;
>     struct gen_device_info *devinfo = &brw->screen->devinfo;
>
>     /* FINISHME: Do this for all platforms that the kernel supports */
> --
> 2.13.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list