[Mesa-dev] [PATCH 0/3] Rework mapping of built-in uniforms to Mesa state slots

Ian Romanick idr at freedesktop.org
Fri Mar 25 11:40:47 PDT 2011


Previous to this patch series the mapping of GLSL built-in uniforms to Mesa
state vectors happend in the back-end.  This posed a major problem for the
planned conversion of the ARB_vertex_program assembler to GLSL IR.  In
assembly shaders, developers can create the moral equivalent of uniform arrays
that pull individual vector values from arbitrary pieces of state.  This makes
it impossible to do name-to-slot matching in the back-end.

 src/glsl/ir.h                        |   26 +++
 src/glsl/ir_clone.cpp                |   12 ++
 src/glsl/ir_variable.cpp             |  299 +++++++++++++++++++++++++++++++++-
 src/glsl/linker.cpp                  |   13 ++
 src/mesa/drivers/dri/i965/brw_fs.cpp |   73 +++------
 src/mesa/main/uniforms.c             |  248 ----------------------------
 src/mesa/program/ir_to_mesa.cpp      |   75 +++------
 7 files changed, 396 insertions(+), 350 deletions(-)


More information about the mesa-dev mailing list