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

Jason Ekstrand jason at jlekstrand.net
Fri Aug 18 01:49:30 UTC 2017


On Thu, Aug 17, 2017 at 4:45 PM, Timothy Arceri <tarceri at itsqueeze.com>
wrote:

>
>
> On 18/08/17 00:33, Jason Ekstrand wrote:
>
>> On Thu, Aug 17, 2017 at 4:03 AM, Timothy Arceri <tarceri at itsqueeze.com
>> <mailto:tarceri at itsqueeze.com>> wrote:
>>
>>     ---
>>       src/mesa/drivers/dri/i965/brw_context.c | 6 ++++++
>>       1 file changed, 6 insertions(+)
>>
>>     diff --git a/src/mesa/drivers/dri/i965/brw_context.c
>>     b/src/mesa/drivers/dri/i965/brw_context.c
>>     index d97a24fbf8..8485e8a30c 100644
>>     --- a/src/mesa/drivers/dri/i965/brw_context.c
>>     +++ b/src/mesa/drivers/dri/i965/brw_context.c
>>     @@ -668,20 +668,26 @@ 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.MaxArrayTextureLaye
>> rs;
>>          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 CTS tests currently fail on SNB when this is enabled.
>>
>>
>> There is a very good reason for this.  I know because I've come across it
>> before.  However, grepping through the code, I can't figure out why. :(
>> What CTS tests start failing?
>>
>
>     Project: piglit-test
>     Test: piglit.spec.glsl-1_50.uniform_buffer.gs-float-array-variable
> -index
>     Status: fail
>     Platform/arch:
>     snb/m64
>     Command line: /tmp/build_root/m64/lib/piglit/bin/shader_runner
>
> /tmp/build_root/m64/lib/piglit/tests/spec/glsl-1.50/uniform_
> buffer/gs-float-
>     array-variable-index.shader_test -auto -fbo
>     Project: piglit-test
>     Test: piglit.spec.glsl-1_40.uniform_buffer.vs-float-array-variable
> -index
>     Status: fail
>     Platform/arch:
>     snb/m64
>     Command line: /tmp/build_root/m64/lib/piglit/bin/shader_runner
>
> /tmp/build_root/m64/lib/piglit/tests/spec/glsl-1.40/uniform_
> buffer/vs-float-
>     array-variable-index.shader_test -auto -fbo
>

I did a bit of looking and the messages we're using for doing uniform pulls
in the vec4 back-end on SNB is the OWORD block load instruction which takes
its offset in units of OWORDS (16 bytes).  On IVB+, we use the sampler
which doesn't have these restrictions.  Let's give it a proper comment.

--Jason


>
>>     +    */
>>     +   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 <mailto:mesa-dev at lists.freedesktop.org
>> >
>>     https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>     <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170817/5584ae8d/attachment.html>


More information about the mesa-dev mailing list