[Mesa-dev] [PATCH 0/7 v2] Refactor uniform initializer handling

Ian Romanick idr at freedesktop.org
Thu May 17 09:41:15 PDT 2012


This was a bit of follow-on work that I had wanted to do back when I
did all the other uniform rework.  Setting the initial values for
uniforms (that have initializers in the GLSL code) is moved from
ir_to_mesa to the linker.

In addition, support for initializers on samplers is added.  This
gives some small simplification in the ff_fragment_shader code.  It
will also make re-working the ARB_fragment_program compiler to use
GLSL IR a bit easier.  In the future, it may also be used to support
sampler "bindings" from GL_ARB_shading_language_420pack.

I would also like to eventually eliminate the extra indirection of
gl_shader_program::SamplerUnits and gl_program::TexturesUsed.  That
code is intertwined with a bunch of other stuff, and it may have to
wait a bit.

This is version 2 of a previously sent patch series.  Since version 1,
a number of piglit tests for this functionality have also been sent
out for review.  The piglit tests that operate on arrays of structures
hit an assertion failure in this code (and just failed in the existing
Mesa code).  The assertion failure is fixed in v2, and the tests
pass.  This is due to changes in patch 1/7.

In addition, the unit tests were moved from tests/glsl to
src/glsl/tests per feedback from Eric and Paul.  This is changed in
patch 7/7.

The remaining 5 patches are unchanged since v1.



More information about the mesa-dev mailing list