History log of /external/mesa3d/src/mesa/program/ir_to_mesa.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7cfd42cefe1949af51ecced9891f415eca2c0e66 14-Sep-2012 Dave Airlie <airlied@redhat.com> mesa/glsl: rename preprocess to glcpp_preprocess

This symbol with dricore escapes into the namespace, its too generic,
we should prefix it with something just to be nice.

Should be applied to stable + 9.0

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 88b0790b1ae8864d4ec6196b3939498bbffdbb5f)
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
af3fc6bb2836ce545c624bce2b47c3fd8cf4f9fa 21-Jul-2012 Eric Anholt <eric@anholt.net> ir_to_mesa: Don't whack the ->location field of uniform block variables.

Fixes some failures in GL_ARB_uniform_buffer_object/maxblocks.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
2ea3ab14f2182978f471674c9dfce029d37f70a7 10-Jul-2012 Eric Anholt <eric@anholt.net> glsl: Add a "ubo_load" expression type for fetches from UBOs.

Drivers will probably want to be able to take UBO references in a
shader like:

uniform ubo1 {
float a;
float b;
float c;
float d;
}

void main() {
gl_FragColor = vec4(a, b, c, d);
}

and generate a single aligned vec4 load out of the UBO. For intel,
this involves recognizing the shared offset of the aligned loads and
CSEing them out. Obviously that involves breaking things down to
loads from an offset from a particular UBO first. Thus, the driver
doesn't want to see

variable_ref(ir_variable("a")),

and even more so does it not want to see

array_ref(record_ref(variable_ref(ir_variable("a")),
"field1"), variable_ref(ir_variable("i"))).

where a.field1[i] is a row_major matrix.

Instead, we're going to make a lowering pass to break UBO references
down to expressions that are obvious to codegen, and amenable to
merging through CSE.

v2: Fix some partial thoughts in the ir_binop comment (review by Kenneth)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
591594ea1e5e9e5865b10b786509b9c3cec042a7 31-Jul-2012 Brian Paul <brianp@vmware.com> ir_to_mesa: make size_swizzles[] array static const
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
f609cf782ab5e90ddf045dc4b0da8cebf99be0d1 27-Apr-2012 Eric Anholt <eric@anholt.net> glsl: Merge the lists of uniform blocks into the linked shader program.

This attempts error-checking, but the layout isn't done yet.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0f1f2ff8db8c19be27b9f51f07134091e109e4b2 19-Jul-2012 Paul Berry <stereotype441@gmail.com> mesa: Set gl_fragment_program::UsesKill in do_set_program_inouts.

Previously, the code for setting this flag for GLSL programs was
duplicated in three places: brw_link_shader(), glsl_to_tgsi_visitor,
and ir_to_mesa_visitor. In addition to the unnecessary duplication,
there was a performance problem on i965: brw_link_shader() set the
flag before doing its final round of optimizations, which meant that
if the optimizations managed to eliminate all the discard operations,
the flag would still be set, resulting (at least in theory) in slower
performance.

This patch consolidates all of the code that sets UsesKill for GLSL
programs into do_set_program_inouts(), which already is doing a
similar job for UsesDFdy, and which occurs after i965's final round of
optimizations.

Non-GLSL programs (ARB programs and the state tracker's glBitmap
program) are unaffected.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fa584c50cf1ddbd96fba4a68563b57c82619e6f4 14-Jun-2012 Paul Berry <stereotype441@gmail.com> ir_to_mesa: Add support for ir_unop_f2u to ir_to_mesa backend.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
e16b0a51be7866f3856b62b295df2bcf49e02384 08-May-2012 Olivier Galibert <galibert@pobox.com> glsl: Bitwise conversion operator support in the software renderers.

TGSI doesn't need an opcode, since registers are untyped (but beware
once doubles come into the scene). Mesa IR doesn't handle native
integers, so trying to handle them there is worthless, the case
entries are only added for warning reasons.

It was only tested with softpipe, since llvmpipe doesn't support glsl
1.3 yet.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
75dac69262481ac26a823a9d06f7f138ec56b01f 09-Apr-2012 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Don't set initial uniform values again

This work is now done by the linker, so we don't need to keep doing it
here.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c343b980d615bb3a159e0adc6e7597f2f9865323 09-Apr-2012 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Propagate initial values in _mesa_associate_uniform_storage

The linker may have set initial values for uniforms. Propagate these
values to the driver's backing storage when it is first associated.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
10ec14865aa7d0110ae202011be36d6e4a7ba154 12-Apr-2012 Vinson Lee <vlee@freedesktop.org> ir_to_mesa: Fix uninitialized member in add_uniform_to_shader.

Fix uninitialized scalar field defect reported by Coverity.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
781e2d5cfae37c24180c0c622467f656582af9f5 02-Apr-2012 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Remove pretense of support for function calls.

While ir_to_mesa contains code that attempts to support functions, I
honestly doubt it's been tested and have little confidence that it
works.

The comment in visit(ir_function *ir) doesn't inspire confidence:
/* Ignore function bodies other than main() -- we shouldn't see calls to
* them since they should all be inlined before we get to ir_to_mesa.
*/

Furthermore, hardware drivers such as i915, i965, and (AFAICT) r200
don't support the BGNSUB/ENDSUB/CAL opcodes anyway. Only swrast does.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
82065fa20ee3f2880a070f1f4f75509b910cedde 21-Sep-2011 Kenneth Graunke <kenneth@whitecape.org> glsl: Remove ir_call::get_callee() and set_callee().

Previously, set_callee() performed some assertions about the type of the
ir_call; protecting the bare pointer ensured these checks would be run.

However, ir_call no longer has a type, so the getter and setter methods
don't actually do anything useful. Remove them in favor of accessing
callee directly, as is done with most other fields in our IR.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6c0df75803e1944f82a1468dcca47d23de82ea6b 15-Nov-2011 Ian Romanick <ian.d.romanick@intel.com> linker: Calculate used samplers and shadow samplers in the linker

It used to be done in ir_to_mesa, and that was kind of a bad place.

I didn't change st_glsl_to_tgsi because there is some strange stuff
happening in the code that generates glDrawPixels shaders. It looked
like this would break horribly if I touched anything.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6a992c3288b6f7a5d94172c9ad1908e71e58233e 15-Nov-2011 Ian Romanick <ian.d.romanick@intel.com> linker: Calculate the sampler to texture target mapping during linking

Track the calculated data in gl_shader_program instead of the
individual assembly shaders.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ec174a424489664626796126f937fbce3e7d8cd8 18-Nov-2011 Marek Olšák <maraeo@gmail.com> mesa: set the gl_FragDepth layout in the GLSL linker

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9d4d9d34d82646e4e7781bb25a64174d35680578 09-Nov-2011 Yuanhan Liu <yuanhan.liu@linux.intel.com> ir_to_mesa: don't init unfirom if link failed

Don't call set_unfiform_initializers if link failed, or it would trigger
a GL_INVALID_OPERATION error. That's not an expected behavior of
glLinkProgram function.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fa704cc558ab321792b364dab43f1e960513bed0 08-Nov-2011 Ian Romanick <ian.d.romanick@intel.com> glsl: Remove resource count checks from ir_to_mesa and st_glsl_to_tgsi

These checks are now performed by the linker.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
be4524aeed7fb67bdc45861d299d4c5ca99c4d6c 19-Oct-2011 Ian Romanick <ian.d.romanick@intel.com> Delete code made dead by previous uniform related patches

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
719909698c67c287a393d2380278e7b7495ae018 19-Oct-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Rewrite the way uniforms are tracked and handled

Switch all of the code in ir_to_mesa, st_glsl_to_tgsi, glUniform*,
glGetUniform, glGetUniformLocation, and glGetActiveUniforms to use the
gl_uniform_storage structures in the gl_shader_program.

A couple of notes:

* Like most rewrite-the-world patches, this should be reviewed by
applying the patch and examining the modified functions.

* This leaves a lot of dead code around in linker.cpp and
uniform_query.cpp. This will be deleted in the next patches.

v2: Update the comment block (previously a FINISHME) in _mesa_uniform
about generating GL_INVALID_VALUE when an out-of-range sampler index
is specified.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
d7a7e4fc99888da424f324d1fc7e066673e804c2 19-Oct-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Add _mesa_associate_uniform_storage

Connects all of the gl_program_parameter structures with the correct
gl_uniform_storage structures.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0c87f16817ff0bf1f05e0d634944fd47b097faee 23-Oct-2011 Chia-I Wu <olv@lunarg.com> mesa: add support for GL_OES_EGL_image_external

This is an OpenGL ES specific extension. External textures are textures that
may be sampled from, but not be updated (no glTexSubImage* and etc.). The
image data are taken from an EGLImage.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
276000472abbc34d86fcb628bc3a1990e9581af3 12-Oct-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Let check_resources halt compilation

Previously check_resources could fail, but we'd still try to optimize
the shader, do device-specific code generation, etc. In some cases,
this could explode (especially in the device-specific code
generation). I haven't found that I could trigger this with the
current code. When too many samplers were used with the new uniform
handling code, I observed several crashes deep down in the driver.

NOTE: This is candidate for the 7.11 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41609
Cc: Eric Anholt <eric@anholt.net>
Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
cf45949d6a896651a5f3864d3b195e26d59eee74 26-Oct-2011 Paul Berry <stereotype441@gmail.com> mesa: Expose GLSL interpolation qualifiers in gl_fragment_program.

This patch makes GLSL interpolation qualifiers visible to drivers via
the array InterpQualifier[] in gl_fragment_program, so that they can
easily be used by driver back-ends to select the correct interpolation
mode.

Previous to this patch, the GLSL compiler was using the enum
ir_variable_interpolation to represent interpolation types. Rather
than make a duplicate enum in core mesa to represent the same thing, I
moved the enum into mtypes.h and renamed it to be more consistent with
the other enums defined there.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6437a71d4172273db670b959dd66e3b34c866962 24-Oct-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Use uniform_field_visitor to add all struct fields to parameter list

Previously the uniform was passed as single, whole structure to
_mesa_add_parameter. This was completely bogus and resulted in a
DataType of 0 (instead of a valid GLSL type enum).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980
Tested-by: Brian Paul <brianp@vmware.com>
Cc: Bryan Cain <bryancain3@gmail.com>
Cc: Vinson Lee <vlee@vmware.com>
Cc: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
1d5d67f8adac9f94715de9804adb536d9a7ec5ee 21-Oct-2011 Ian Romanick <ian.d.romanick@intel.com> glsl: Add uniform_locations_assigned parameter to do_dead_code opt pass

Setting this flag prevents declarations of uniforms from being removed
from the IR. Since the IR is directly used by several API functions
that query uniforms in shaders, uniform declarations cannot be removed
after the locations have been set. However, it should still be safe
to reorder the declarations (this is not tested).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
Cc: Vinson Lee <vlee@vmware.com>
Cc: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
b2572928a50ce42abc2733202d08f5a00733d707 10-Sep-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Generate gl_program_parameter list by walking the GLSL IR.

Generate the program parameters list by walking the IR instead of by
walking the list of linked uniforms. This simplifies the code quite a
bit, and is probably a bit more correct. The list of linked uniforms
should really only be used by the GL API to interact with the
application.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Bryan Cain <bryancain3@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
bbbb8345ab9df2d634dc2a34d257ee2cbf930292 11-Sep-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Move some things outside the 'extern "C"' blocks

Having a few of these includes or forward declarations inside the
'extern "C"' block can cause problems later. Specifically, it
prevents C++ linkage functions from being added to ir_to_mesa.h and
makes G++ angry if 'struct foo' is seen both inside and outside an
'extern "C"'.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
e2bdef53807d0f23c2a1ff326ea8190cb57aa90a 21-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Simplify calling Driver.ProgramStringNotify after previous refactors

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
de772c402215b956ab3aa0875330fc1bf7cdf95b 21-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Use gl_shader_program::_LinkedShaders instead of FragmentProgram

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
39348bf79fb247eec895c93e52f23afe138be46a 20-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Use gl_shader_program::_LinkedShaders instead of GeometryProgram

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
010cc547ca8c1fb2107106b0ad0de560780ce9aa 20-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Use gl_shader_program::_LinkedShaders instead of VertexProgram

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
35613afee3e038b70ada210b2dfbbc9abc883f4f 19-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Remove unused gl_program::Attributes

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
e66fc1cb035caa5375c4ef3578420476ea94d371 29-Sep-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Don't assertion fail on integer modulus.

Drivers implementing GLSL 1.30 want to do integer modulus, and until we
can stop generating code via ir_to_mesa, it's easier to make it silently
generate rubbish code. Multiply will do.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
cd76f114e608ffb93a03ac3ffc3e11876d6a057e 16-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Remove unused field gl_program::Varying

Lots of things set and copy this field around, but nothing uses it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
1d59de1456ba55d32bbe0c0ae45a9358e31e1cd2 27-Sep-2011 Eric Anholt <eric@anholt.net> ir_to_mesa: Don't assertion fail on remaining GLSL 1.30 ops.

For hardware drivers, we only have ir_to_mesa called for the purposes
of potential swrast fallbacks (basically never on a 1.30 driver),
which we don't really care about. This will allow 1.30 to be
implemented without rewriting swrast for it.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
1ad54ae0b1713e399c5db43d0eba87861075b4c7 17-Sep-2011 Paul Berry <stereotype441@gmail.com> mesa: Add a flag to indicate whether a program uses gl_ClipDistance.

GLSL 1.30 requires us to use gl_ClipDistance for clipping if the
vertex shader contains a static write to it, and otherwise use
user-defined clipping planes. Since the driver needs to behave
differently in these two cases, we need a flag to record whether the
shader has written to gl_ClipDistance.

The new flag is called UsesClipDistance. We initially store it in
gl_shader_program (since that is the data structure that is available
when we check to see whethe gl_ClipDistance was written to), and we
later copy it to a flag with the same name in gl_vertex_program, since
that is a more convenient place for the driver to access it (in i965,
at least).

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
30be2cc6c7c3378ee17885b5bf41d7ae53bf6fe0 26-Aug-2011 Kenneth Graunke <kenneth@whitecape.org> i965/fs: Implement texelFetch() on Ironlake and Sandybridge.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
da7233840f3eca0ba892ca318081c88e2457cc63 05-Sep-2011 Marek Olšák <maraeo@gmail.com> ir_to_mesa: fix shadow2DArray comparison

The depth should be in W.

v2: adjust the assertion, add a comment
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
488fe51cf823ccd137c667f1e92dd86f8323b723 01-Sep-2011 Bryan Cain <bryancain3@gmail.com> mesa: Replace the EmitNoIfs compiler flag with a MaxIfDepth flag.

This is a better, more fine-grained way of lowering if statements. Fixes the
game And Yet It Moves on nv50.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
478034f34a59969103237eb78bc82f9e70fe81c2 28-Aug-2011 Bryan Cain <bryancain3@gmail.com> glsl: Use a separate div_to_mul_rcp lowering flag for integers.

Using multiply and reciprocal for integer division involves potentially
lossy floating point conversions. This is okay for older GPUs that
represent integers as floating point, but undesirable for GPUs with
native integer division instructions.

TGSI, for example, has UDIV/IDIV instructions for integer division,
so it makes sense to handle this directly. Likewise for i965.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Bryan Cain <bryancain3@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
79a486ead92e4493b2de1fedf0c8cb5de47003cd 23-Aug-2011 Kai Wasserbäch <kai@dev.carbon-project.org> Change return type of try_emit_* methods to bool.

Ian Romanick explained (Message-Id: <4E528973.6080902@freedesktop.org>),
that the return type of non-API methods shouldn't use GLboolean but a
standard C++ bool.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ecf8963754489abfb5097c130a9bcd4cdb76b6bd 19-Jun-2011 Kenneth Graunke <kenneth@whitecape.org> i965/fs: Implement textureSize (TXS) on Gen5+.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
1e3bcbdf31f09666ba358f35ff9486faee3642ca 25-Feb-2011 Kenneth Graunke <kenneth@whitecape.org> glsl: Add a new ir_txs (textureSize) opcode to ir_texture.

One unique aspect of TXS is that it doesn't have a coordinate.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
07e9b9049f94ceb443eac1206cc3f9e1e51ac6c1 18-Aug-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Remove incorrect usage of the 'struct' keyword on classes.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ff2cfb8989cd79218dfe2cd8c3de20f1ca7418e6 02-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Emit a MAD(b, -a, b) for !a && b

!a && b occurs frequently when nexted if-statements have been
flattened. It should also be possible use a MAD for (a && b) || c,
though that would require a MAD_SAT.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ba01df11c4d09c65514a8522cb319e29034ab5a8 04-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Implement ir_binop_all_equal using DP4 w/SGE

The operation ir_binop_all_equal is !(a.x != b.x || a.y != b.y || a.z
!= b.z || a.w != b.w). Logical-or is implemented using addition
(followed by clampling to [0,1]) on values of 0.0 and 1.0. Replacing
the logical-or operators with addition gives !bool((int(a.x != b.x) +
int(a.y == b.y) + int(a.z == b.z) + int(a.w == b.w)). This can be
implemented using a dot-product with a vector of all 1.0. After the
dot-product, the value will be an integer on the range [0,4].

Previously a SEQ instruction was used to clamp the resulting logic
value to [0,1] and invert the result. Using an SGE instruction on the
negation of the dot-product result has the same effect. Many older
shader architectures do not support the SEQ instruction. It must be
emulated using two SGE instructions and a MUL. On these
architectures, the single SGE saves two instructions.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
e7bf096e8b04931996c8c56548ce0b2c0af3a0dc 04-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Implement ir_binop_any_nequal using DP4 w/saturate or DP4 w/SLT

The operation ir_binop_any_nequal is (a.x != b.x) || (a.y != b.y) ||
(a.z != b.z) || (a.w != b.w), and that is the same as any(bvec4(a.x !=
b.x, a.y != b.y, a.z != b.z, a.w != b.w)). Implement the any() part
the same way the regular ir_unop_any is implemented.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
92ca560d68e8a6b532998707afcf4f60c0ce2806 04-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Implement ir_unop_any using DP4 w/saturate or DP4 w/SLT

This is just like the ir_binop_logic_or case. The operation
ir_unop_any is (a.x || a.y || a.z || a.w). Logical-or is implemented
using addition (followed by clampling to [0,1]) on values of 0.0 and
1.0. Replacing the logical-or operators with addition gives (a.x +
a.y + a.z + a.w). This can be implemented using a dot-product with a
vector of all 1.0.

Previously a SNE instruction was used to clamp the resulting logic
value to [0,1]. In a fragment shader, using a saturate on the
dot-product has the same effect. Adding the saturate to the
dot-product is free, so (at least) one instruction is saved.

In a vertex shader, using an SLT on the negation of the dot-product
result has the same effect. Many older shader architectures do not
support the SNE instruction. It must be emulated using two SLT
instructions and an ADD. On these architectures, the single SLT saves
two instructions.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
7f4c65256cc3f4d9f6a214424beabe688a5dd6a2 30-Jul-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Make ir_to_mesa_visitor::emit_dp return the instruction

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
41f8ffe5e07c4f389eb13d17ecf0ff776890e9bc 30-Jul-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Implement ir_binop_logic_or using an add w/saturate or add w/SLT

Logical-or is implemented using addition (followed by clampling to
[0,1]) on values of 0.0 and 1.0. Replacing the logical-or operators
with addition gives a + b which has a result on the range [0, 2].

Previously a SNE instruction was used to clamp the resulting logic
value to [0,1]. In a fragment shader, using a saturate on the add has
the same effect. Adding the saturate to the add is free, so (at
least) one instruction is saved.

In a vertex shader, using an SLT on the negation of the add result has
the same effect. Many older shader architectures do not support the
SNE instruction. It must be emulated using two SLT instructions and
an ADD. On these architectures, the single SLT saves two
instructions.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6ad08989d7c10892919ce1cb9c88c4cf8b73e1dc 30-Jul-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Implement ir_unop_logic_not using 1-x

Since our logic values are 0.0 (false) and 1.0 (true), 1.0 - x
accurately implements logical not.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4c7e215c7bb09f827df630cbfc80e87869351f18 03-May-2011 Eric Anholt <eric@anholt.net> ir_to_mesa: Replace open-coded swizzle_for_size()
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
62722d90af9d43d889af33b080a682f2004e049c 22-Jul-2011 Eric Anholt <eric@anholt.net> ir_to_mesa: Try to avoid emitting a MOV_SAT to saturate an expression tree.

Fixes a regression in codegen quality for ff_fragment_shader
conversion to GLSL -- glean texCombine produces 7.5% fewer Mesa IR
instructions.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4683529048ee133481b2d8f1cae1685aa1736f9a 04-Aug-2011 Bryan Cain <bryancain3@gmail.com> Merge branch 'glsl-to-tgsi'

Conflicts:
src/mesa/state_tracker/st_atom_pixeltransfer.c
src/mesa/state_tracker/st_program.c
322c3bf9dc4c6edbf5a8793475ce1307e1c0186b 26-Jul-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Emit warnings instead of errors for IR that can't be lowered

Rely on the driver to do the right thing. This probably means falling
back to software. Page 88 of the OpenGL 2.1 spec specifically says:

"A shader should not fail to compile, and a program object should
not fail to link due to lack of instruction space or lack of
temporary variables. Implementations should ensure that all valid
shaders and program objects may be successfully compiled, linked
and executed."

There is no provision for saying "No" to a valid shader that is
difficult for the hardware to handle, so stop doing that.

On i915 this causes a large number of piglit tests to change from FAIL
to WARN. The warning is because the driver still emits messages to
stderr like "i915_program_error: Unsupported opcode: BGNLOOP".

It also fixes ES2 conformance CorrectFull_frag and CorrectParse1_frag
on i915 (and probably other hardware that can't handle loops).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
8aadd89d07d750aadd10989fa9c81f8a2fdd98e2 26-Jul-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Use Add linker_error instead of fail_link

The functions were almost identical.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6d89abadbcd68bbe9e08f041412549f8dc1fc73c 18-May-2011 Bryan Cain <bryancain3@gmail.com> mesa: support boolean and integer-based parameters in prog_parameter

The functionality is not used by anything yet, and the glUniform functions will
need to be reworked before this can reach its full usefulness. It is
nonetheless a step towards integer support in the state tracker and classic drivers.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
f7cd9a858c043e609fcdbf9ac9dfc1ef7ad002bf 18-Jul-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Copy reladdr in src_reg(dst_reg) constructor

Fixes i965 piglit:

vs-temp-array-mat[234]-col-row-wr
vs-temp-array-mat[234]-index-col-row-wr
vs-temp-array-mat[234]-index-row-wr
vs-temp-mat[234]-col-row-wr

Fixes swrast piglit:

fs-temp-array-mat[234]-col-row-wr
fs-temp-array-mat[234]-index-col-row-wr
fs-temp-array-mat[234]-index-row-wr
fs-temp-mat[234]-col-row-wr
vs-temp-array-mat[234]-col-row-wr
vs-temp-array-mat[234]-index-col-row-wr
vs-temp-array-mat[234]-index-row-wr
vs-temp-mat[234]-col-row-wr

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
d6e1a8f71437d4a65e65f93271b2892dd62b0d23 18-Jul-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Add each relative address to the previous

This fixes many cases of accessing arrays of matrices using
non-constant indices at each level.

Fixes i965 piglit:

vs-temp-array-mat[234]-index-col-rd
vs-temp-array-mat[234]-index-col-row-rd
vs-temp-array-mat[234]-index-col-wr
vs-uniform-array-mat[234]-index-col-rd

Fixes swrast piglit:

fs-temp-array-mat[234]-index-col-rd
fs-temp-array-mat[234]-index-col-row-rd
fs-temp-array-mat[234]-index-col-wr
fs-uniform-array-mat[234]-index-col-rd
fs-uniform-array-mat[234]-index-col-row-rd
fs-varying-array-mat[234]-index-col-rd
fs-varying-array-mat[234]-index-col-row-rd
vs-temp-array-mat[234]-index-col-rd
vs-temp-array-mat[234]-index-col-row-rd
vs-temp-array-mat[234]-index-col-wr
vs-uniform-array-mat[234]-index-col-rd
vs-uniform-array-mat[234]-index-col-row-rd
vs-varying-array-mat[234]-index-col-rd
vs-varying-array-mat[234]-index-col-row-rd
vs-varying-array-mat[234]-index-col-wr

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
a166720f2d93b090ad1c383c9bd90d0a9e27760d 02-May-2011 Eric Anholt <eric@anholt.net> ir_to_mesa: typo fix in a comment.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
dbda466fc05a6262ba857a7887e16347cf3d3e96 25-Jun-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Allocate temporary instructions on the visitor's ralloc context

And don't delete them. Let ralloc clean them up. Deleting the
temporary IR leaves dangling references in the prog_instruction. That
results in a bad dereference when printing the IR with MESA_GLSL=dump.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
006d5a1aa4f9e07ceefdbb68324e9806f737a71c 15-Jun-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: "Support" u2f, i2u, and u2i operations by doing nothing.

Mesa IR actually stores all numbers as floating point, so this is
totally a farce, but we may as well keep it going.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9bd7e9c6b29b212a97bd4ca6c62836160b2f7698 17-May-2011 Eric Anholt <eric@anholt.net> mesa: Include shader target in dumps of GLSL source.

This makes automatic parsing of MESA_GLSL=dump output easier.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
68074387a4af74e1b1b42908b23a4a7ca2c1efa4 01-Feb-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Emit TXD instruction.

Mesa already supports this because of NV_fragment_program.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
847d397b3415b6705a084013903e1a7e8384e1d2 01-May-2011 Marek Olšák <maraeo@gmail.com> ir_to_mesa: remove set-but-unused variables
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
847f991a87b9549eb89a521edb7cd149005006bb 12-Apr-2011 Brian Paul <brianp@vmware.com> ir_to_mesa: silence signed/unsigned comparison warnings
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
b4dfb7473efd378c51b955a856eaef69312c1f9f 05-Apr-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Use gl_register_file enum type rather than 'int'.

src_reg already used this; make dst_reg use it too.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ce5d969adf4db6e95e7f1abb0a5532311d1c3c28 05-Apr-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Unprefix ir_to_mesa_undef* and ir_to_mesa_address_reg.

Rename ir_to_mesa_undef to undef_src, for clarity.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5d9718f0dbe1bb9b25324c43ed0fa631735c6a51 05-Apr-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Use emit overloads to avoid passing undef registers.

Makes the code just a little bit cleaner.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
01e19fcf1f36cea40cc5efc48796d4e153a20f2f 05-Apr-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Rename ir_to_mesa_emit_*_opX methods to emit_*.

There's really no need for a prefix on member functions, and overloading
takes care of the _op1/_op2 distinction quite nicely. Eric already made
a similar change in the i965 FS backend.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
cb21fa91b8e8f46d7d27604b9cb77fba031567f4 05-Apr-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Use constructors to convert between src_reg and dst_reg.

Rather than ir_to_mesa_dst_reg_from_src and ir_to_mesa_src_reg_from_dst.

The new constructors are marked 'explicit' so that the compiler can
catch cases where source and destination registers were accidentally
interchanged.

This also necessitated using constructors to initialize the undef and
address registers, as well as adding a default constructor.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fc6b4332c32461d0e092c908a0f3d9d44d1452a9 05-Apr-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Remove the "ir_to_mesa_" prefix on src_reg/dst_reg types.

Both classes are completely private to ir_to_mesa.cpp, so there won't be
any name conflicts with other parts of Mesa. The prefix simply makes it
harder to read.

Also, use a class rather than typedef structs.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
461273e9105b8d0d53c26854ac5ba68814c31a67 05-Apr-2011 Kenneth Graunke <kenneth@whitecape.org> ir_to_mesa: Rename src_reg and dst_reg variables to src and dst.

This is in preparation from removing the "ir_to_mesa_" prefix on the
src_reg and dst_reg types, which would cause a naming conflict.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9996a86085edb2bdbcb165d985203ee8ce6a9b22 04-Apr-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Handle shadow compare w/projection and LOD bias correctly

The code would previously handle the projection, then swizzle the
shadow comparitor into place. However, when the projection is done
"by hand," as in the TXB case, the unprojected shadow comparitor would
over-write the projected shadow comparitor.

Shadow comparison with projection and LOD is an extremely rare case in
real application code, so it shouldn't matter that we don't handle
that case with the greatest efficiency.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=32395
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
a99e80d795f7c6aec0e73369a31d1728577b9727 25-Mar-2011 Ian Romanick <ian.d.romanick@intel.com> mesa: Fix ugly indentation left from previous commit

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
89d81ab16c05818b290ed735c1343d3abde449bf 25-Jan-2011 Ian Romanick <ian.d.romanick@intel.com> glsl: Calcluate Mesa state slots in front-end instead of back-end

This should be the last bit of infrastructure changes before
generating GLSL IR for assembly shaders.

This commit leaves some odd code formatting in ir_to_mesa and brw_fs.
This was done to minimize whitespace changes / reindentation in some
loops. The following commit will restore formatting sanity.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5e9aa9926b9bdf1260ce7350b88908bda337388b 26-Feb-2011 Kenneth Graunke <kenneth@whitecape.org> mesa: Remove the CompileShader driver hook; it's just a no-op.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0f84ddad29284b407c6bbef0b731201056d40324 13-Mar-2011 Marek Olšák <maraeo@gmail.com> ir_to_mesa: do not check the number of uniforms against hw limits

The r300 compiler can eliminate unused uniforms and remap uniform locations
if their number surpasses hardware limits, so the limit is actually
NumParameters + NumUnusedParameters. This is important for some apps
under Wine to run.

Wine sometimes declares a uniform array of 256 vec4's and some Wine-specific
constants on top of that, so in total there is more uniforms than r300 can
handle. This was the main motivation for implementing the elimination
of unused constants.

We should allow drivers to implement fail & recovery paths where it makes
sense, so giving up too early especially when comes to uniforms is not
so good idea, though I agree there should be some hard limit for all drivers.

This patch fixes:
- glsl-fs-uniform-array-5
- glsl-vs-large-uniform-array
on drivers which can eliminate unused uniforms.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
d7db14ab7d66520b6030c0aa48c94507179a8d4e 11-Mar-2011 Brian Paul <brianp@vmware.com> mesa: test against MaxUniformComponents in check_resources()

Since we're compiling/linking GLSL shaders we should check against
the shader uniform limits, not the legacy vertex/fragment program
parameter limits which are usually lower.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
e0e94026a0648d6b33d6b7cf2b9b01429cf945e4 11-Mar-2011 Brian Paul <brianp@vmware.com> mesa: move location of some geometry program limits

The gl_program_constants struct is for limits that are applicable to
any/all shader stages. Move the geometry shader-only fields into the
gl_constants struct.
Remove redundant MaxGeometryUniformComponents field too.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
8cc84b3e454cf03c71282322e988f03bc4a1baa3 11-Mar-2011 Brian Paul <brianp@vmware.com> mesa: use check_resources() to check program against limits

Without these checks we could create shaders with more samplers,
constants than the driver could handle. Fail linking rather than
dying later.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
8902c42db4fd72568cfa071987cfa10e7a366c2e 17-Feb-2011 José Fonseca <jfonseca@vmware.com> mesa: Do copy propagation across if-else-endif.

Addresses excessive TEMP allocation in vertex shaders where all CONSTs are
stored into TEMPS at the start, but copy propagation was failing due to
the presence of IFs.

We could do something about loops, but ifs are easy enough.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
3803295fc2b9c517e80aa46f2338308e23e64e4a 12-Feb-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Don't dereference a NULL pointer during copy propagation

The ACP may already be NULL, so don't try to make it NULL again.

This should fix bugzilla #34119.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
76857e8954484d5bf8758d7bfc87f264f95a0ebd 04-Feb-2011 Eric Anholt <eric@anholt.net> mesa: Fix the Mesa IR copy propagation to not read past writes to the reg.

Fixes glsl-vs-post-increment-01.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
d3073f58c17d8675a2ecdd5dfa83e5520c78e1a8 21-Jan-2011 Kenneth Graunke <kenneth@whitecape.org> Convert everything from the talloc API to the ralloc API.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
7a4345fd83605695dc641af503f6e87b808b48d7 27-Jan-2011 Brian Paul <brianp@vmware.com> glsl: use 'this' pointer to be consistent
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
2b7be12d5467096362073260911a380c64c772d0 27-Jan-2011 Brian Paul <brianp@vmware.com> glsl: remove needless conditional
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
86471246f0f3c4c122f605fdd56dd0f5864fc307 27-Jan-2011 Brian Paul <brianp@vmware.com> glsl: move ir_var_out code
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
7baa498ae46668aebf165b9f2b1ddf0f5fe87c07 27-Jan-2011 Brian Paul <brianp@vmware.com> glsl: move ir_var_system_value code
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
304b239869fe5cd57dc87e6fd95c4906d9653b97 27-Jan-2011 Brian Paul <brianp@vmware.com> glsl: use local var to simplify code a bit
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
a1b83464ffb1125b77e6f5664e0071f95167055d 27-Jan-2011 Chad Versace <chad.versace@intel.com> mesa: Propagate gl_FragDepth layout from GLSL IR to Mesa IR
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5c2cec8337c5afc6941cd5c0bcedd27ff99b1bc7 25-Jan-2011 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Add several assertions about sizes of arrays

Both of these assertions are triggered by the test case in bugzilla
size of 0.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
652901e95b4ed406293d0e1fabee857c054119b1 15-Jan-2011 Brian Paul <brianp@vmware.com> Merge branch 'draw-instanced'

Conflicts:
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/glsl/ir_set_program_inouts.cpp
src/mesa/tnl/t_vb_program.c
25beab10cd39a400a0a6d2495cf814d22f346e81 15-Jan-2011 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix segfaults on ir_to_mesa invocation after MSVC change.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
7772a34f3aedfa8ef58ad5f912f56bd5adf27057 15-Jan-2011 Vinson Lee <vlee@vmware.com> mesa: Dynamically allocate acp array in ir_to_mesa_visitor::copy_propagate.

Fixes these MSVC errors.
ir_to_mesa.cpp(2644) : error C2057: expected constant expression
ir_to_mesa.cpp(2644) : error C2466: cannot allocate an array of constant size 0
ir_to_mesa.cpp(2644) : error C2133: 'acp' : unknown size
ir_to_mesa.cpp(2646) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand
ir_to_mesa.cpp(2709) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand
ir_to_mesa.cpp(2718) : error C2070: 'ir_to_mesa_instruction *[]': illegal sizeof operand
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
34a9da4eb4dd41dc874f1a175e993e42d4ff4b2a 13-Jan-2011 Eric Anholt <eric@anholt.net> mesa: Add channel-wise copy propagation to ir_to_mesa.

This catches more opportunities than the prog_optimize.c code on
openarena's fixed function shaders turned to GLSL, mostly due to
looking at multiple source instructions for copy propagation
opportunities. It should also be much more CPU efficient than
prog_optimize.c's code.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9ac6a9b2fa45debac63f2e2b20d78c4776d06e37 27-Dec-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Support if-flattening beyond a given maximum nesting depth.

This adds a new optional max_depth parameter (defaulting to 0) to
lower_if_to_cond_assign, and makes the pass only flatten if-statements
nested deeper than that.

By default, all if-statements will be flattened, just like before.

This patch also renames do_if_to_cond_assign to lower_if_to_cond_assign,
to match the new naming conventions.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
2d577ee730c30caacf711babde6542766aa0b655 14-Dec-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors

This is the same as what the array dereference handler does.

Fixes piglit test glsl-link-struct-array (bugzilla #31648).

NOTE: This is a candidate for the 7.9 and 7.10 branches.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
691048a22acf930e263711cf206e792a1b52f342 09-Dec-2010 Brian Paul <brianp@vmware.com> mesa: ir_to_mesa support for system values
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c4285be9a5bd1adaa89050989374b95a9a601cdc 25-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Lower ir_binop_pow to a sequence of EXP2 and LOG2
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
940df10100d740ef27fa39026fd51c3199ed3d62 25-Nov-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Add a lowering pass to move discards out of if-statements.

This should allow lower_if_to_cond_assign to work in the presence of
discards, fixing bug #31690 and likely #31983.

NOTE: This is a candidate for the 7.9 branch.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ead2ea89f42b40edc56ddf8c6ce1df4efdcefe2a 25-Nov-2010 Marek Olšák <maraeo@gmail.com> ir_to_mesa: Add support for conditional discards.

NOTE: This is a candidate for the 7.9 branch.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
903ead0b26e4fc55474b652adf9470247283e7aa 24-Nov-2010 Brian Paul <brianp@vmware.com> glsl: start restoring some geometry shader code
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6162773ea4b0e84c3ab9c9952fb5e838519c2564 24-Nov-2010 Brian Paul <brianp@vmware.com> glsl: better handling of linker failures

Upon link error, exit translation loop, free program instructions.
Check for null pointers in calling code.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
caf974c5259f14b50257e8dd9b325a87378259af 23-Nov-2010 Brian Paul <brianp@vmware.com> glsl: use gl_register_file in a few places
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
50fd99d1723a6c7f3bd2dedffeeadf7d5e33b83b 22-Nov-2010 Brian Paul <brianp@vmware.com> glsl: fix off by one in register index assertion
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ac89a90401f08df945248fcc96da59ba0e2bbfa9 19-Nov-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Detect and emit MOV_SATs for saturate constructs.

The goal here is to avoid regressing performance on ir_to_mesa drivers
for fixed function fragment shaders requiring saturates.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
63684a9ae7a66f68df1f2c68cd9358e5622122a3 19-Nov-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Combine many instruction lowering passes into one.

This should save on the overhead of tree-walking and provide a
convenient place to add more instruction lowering in the future.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
11d6f1c69871d0b7edc28f639256460839fccd2d 16-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Add ir_quadop_vector expression

The vector operator collects 2, 3, or 4 scalar components into a
vector. Doing this has several advantages. First, it will make
ud-chain tracking for components of vectors much easier. Second, a
later optimization pass could collect scalars into vectors to allow
generation of SWZ instructions (or similar as operands to other
instructions on R200 and i915). It also enables an easy way to
generate IR for SWZ instructions in the ARB_vertex_program assembler.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fc92e87b9757eda01caf0bb3e2c31b1dbbd73aa0 11-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Eliminate assumptions about size of ir_expression::operands

This may grow in the near future.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
f2616e56de8a48360cae8f269727b58490555f4d 18-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Add ir_unop_sin_reduced and ir_unop_cos_reduced

The operate just like ir_unop_sin and ir_unop_cos except that they
expect their inputs to be limited to the range [-pi, pi]. Several
GPUs require this limited range for their sine and cosine
instructions, so having these as operations (along with a to-be-written
lowering pass) helps this architectures.

These new operations also matche the semantics of the
GL_ARB_fragment_program SCS instruction. Having these as operations
helps in generating GLSL IR directly from assembly fragment programs.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c05ccc1ebde177646ac09c1bd6d1b4719e745f82 19-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Generate smarter code for some conditional moves

Condiation moves with a condition of (a < 0), (a > 0), (a <= 0), or (a
>= 0) can be generated with "a" directly as an operand of the CMP
instruction. This doesn't help much now, but it will help with
assembly shaders that use the CMP instruction.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9935fe705df44bb633039ca74332cc0c126ccc30 17-Nov-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Remove the ir_binop_cross opcode.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ad8cb131d8f73dee75e7be39dbc004783cd7f350 10-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Refactor code for emitting DP instructions
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
3322fbaf3b5e305ce00c1d08c26965bb98e0cef0 14-Oct-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Slightly change the semantic of _LinkedShaders

Previously _LinkedShaders was a compact array of the linked shaders
for each shader stage. Now it is arranged such that each slot,
indexed by the MESA_SHADER_* defines, refers to a specific shader
stage. As a result, some slots will be NULL. This makes things a
little more complex in the linker, but it simplifies things in other
places.

As a side effect _NumLinkedShaders is removed.

NOTE: This may be a candidate for the 7.9 branch. If there are other
patches that get backported to 7.9 that use _LinkedShader, this patch
should be cherry picked also.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
d85d25dd1f4fd281bd210ba6ba5135ba1e3b535f 14-Oct-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Add a new ir_unop_round_even opcode for GLSL 1.30's roundEven.

Also, update ir_to_mesa's "1.30 is unsupported" case to "handle" it.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
f9995b30756140724f41daf963fa06167912be7f 12-Oct-2010 Kristian Høgsberg <krh@bitplanet.net> Drop GLcontext typedef and use struct gl_context instead
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9fea9e5e2115bcb52435648d2ef753638733d7d9 12-Oct-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Fix incorrect assertion

This assertion was added in commit f1c1ee11, but it did not notice
that the array is accessed with 'size-1' instead of 'size'. As a
result, the assertion was off by one. This caused failures in at
least glsl-orangebook-ch06-bump.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
f1c1ee11d34f4aa5975641a615c7fd2edb32e1c0 12-Oct-2010 Brian Paul <brianp@vmware.com> ir_to_mesa: assorted clean-ups, const qualifiers, new comments
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
daacaac3c8b91c87ab2cfc2d9f821474552b8181 29-Sep-2010 Eric Anholt <eric@anholt.net> mesa: Move the list of builtin uniform info from ir_to_mesa to shared code.

I'm still not pleased with how builtin uniforms are handled, but as
long as we're relying on the prog_statevar stuff this seems about as
good as it'll get.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
a32893221ce253da7bb465e0ec9d0df5f7208d8f 28-Sep-2010 Eric Anholt <eric@anholt.net> mesa: Pull ir_to_mesa's sampler number fetcher out to shared code.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
eaa6bf59db68f97fa32c3395eb4aa6e589f34b26 22-Sep-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Only compare vector_elements present for any_nequal/all_equal

Fixes: glsl-mat-from-int-ctor-03
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
b39e6f33b60ef9bbaf81f320aaca6a440d8a6a8f 22-Sep-2010 Eric Anholt <eric@anholt.net> glsl: Rework assignments with write_masks to have LHS chan count match RHS.

It turns out that most people new to this IR are surprised when an
assignment to (say) 3 components on the LHS takes 4 components on the
RHS. It also makes for quite strange IR output:

(assign (constant bool (1)) (x) (var_ref color) (swiz x (var_ref v) ))
(assign (constant bool (1)) (y) (var_ref color) (swiz yy (var_ref v) ))
(assign (constant bool (1)) (z) (var_ref color) (swiz zzz (var_ref v) ))

But even worse, even we get it wrong, as shown by this line of our
current step(float, vec4):

(assign (constant bool (1)) (w)
(var_ref t)
(expression float b2f (expression bool >=
(swiz w (var_ref x))(var_ref edge))))

where we try to assign a float to the writemasked-out x channel and
don't supply anything for the actual w channel we're writing. Drivers
right now just get lucky since ir_to_mesa spams the float value across
all the source channels of a vec4.

Instead, the RHS will now have a number of components equal to the
number of components actually being written. Hopefully this confuses
everyone less, and it also makes codegen for a scalar target simpler.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ff78d6dcc07c0951cddc72e76cad355239a43c73 18-Sep-2010 Vinson Lee <vlee@vmware.com> ir_to_mesa: Remove unused member array_indexed from struct statevar_element.

Fixes this GCC warning.
warning: missing initializer for member 'statevar_element::array_indexed'
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
a6ecd1c3724a78b76ab9e81ea39632f1279021f8 16-Sep-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Add flags to enable variable index lowering
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
7545514fb65f807fa2c888954f0ac153a918e2ce 15-Sep-2010 Brian Paul <brianp@vmware.com> glsl2: fix signed/unsigned comparison warning
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4dfb89904c0a3d2166e9a3fc0253a254680e91bc 08-Sep-2010 Luca Barbieri <luca@luca-barbieri.com> glsl: introduce ir_binop_all_equal and ir_binop_any_equal, allow vector cmps

Currently GLSL IR forbids any vector comparisons, and defines "ir_binop_equal"
and "ir_binop_nequal" to compare all elements and give a single bool.

This is highly unintuitive and prevents generation of optimal Mesa IR.

Hence, first rename "ir_binop_equal" to "ir_binop_all_equal" and
"ir_binop_nequal" to "ir_binop_any_nequal".

Second, readd "ir_binop_equal" and "ir_binop_nequal" with the same semantics
as less, lequal, etc.

Third, allow all comparisons to acts on vectors.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
87708e8c90220cc1997cef9de9b394c04d952be9 07-Sep-2010 Luca Barbieri <luca@luca-barbieri.com> glsl: call ir_lower_jumps according to compiler options
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
2b70dbfe091af5ae7c788e16275e1af2cb1c284c 10-Sep-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Add EmitNoNoise flag, use it to remove noise opcodes
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
3a5ce85cfa4914711e56c8cf831699242618928e 02-Sep-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Add ir_unop_noise
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
e591c4625cae63660c5000fbab366e40fe154ab0 05-Sep-2010 Luca Barbieri <luca@luca-barbieri.com> glsl: add several EmitNo* options, and MaxUnrollIterations

This increases the chance that GLSL programs will actually work.

Note that continues and returns are not yet lowered, so linking
will just fail if not supported.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6d3a2c97f4a78e85545286e0e126cd3a27bd1cbd 05-Sep-2010 Luca Barbieri <luca@luca-barbieri.com> glsl: make compiler options per-target

This allows us to specify different options, especially useful for chips
without unified shaders.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
7dcfc44b72f00ba5a38cb02123c80113440f0de9 05-Sep-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.

Also define it if #version 100 is encountered.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4a867be14378587574b3082071e9fff962d28d12 08-Sep-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add support for gl_NormalScale.

Bug #30040.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
a09a8ec12d76e1fb1583fa99cf9f48246c108d7b 08-Sep-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Make sure shader source isn't NULL.

This should only occur if glCompileShader is called without a prior call
to glShaderSource. An empty source program should be the empty string.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
acd7c21541110d7ae6b9e63647391f65946e5c5d 07-Sep-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix warning in last commit.

I swear there was some git option for "don't push things when you've
got uncommitted changes", but I can't find it now.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6c0ba32fd1466e8c1700acab3003dc1fe1deb337 02-Sep-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Move the STATE_VAR elements of a builtin uniform to a temp (v2).

Like the constant handling and the handling of other uniforms, we add
the whole thing to the Parameters, avoiding messy, incomplete logic
for adding just the elements of a builting uniform that get used.
This means that a driver that relies only on ParameterValues[] for its
parameters will have an increased parameter load, but drivers
generally don't do that (since they have other params they need to
handle, too).

Fixes glsl-fs-statevar-call (testcase for Ember). Bug #29687.

v2: Continue referencing the STATE_VAR[] file directly when the
uniform will land in STATE_VAR[] formatted exactly as we'd put into a
temporary. When there's array dereferencing, we don't copy-propagate
in Mesa IR (not knowing where the array is in register space), so
smarts here are required or we'll massively increase the temp count.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
280665be7026c978acead9713c10271c36a571ee 04-Sep-2010 Marek Olšák <maraeo@gmail.com> Revert "ir_to_mesa: Load all the STATE_VAR elements of a builtin uniform to a temp."

This reverts commit 5ad74779cea07cc6a19a52874cdaef8b018e2f1b.

Sorry, but I had to revert this.

Any commit which needlessly increases the number of temporaries is wrong.
More temporaries mean less shader performance because of reduced parallelism
and therefore less efficient latency hiding. In this case, there is possible
performance degradation of every shader which uses GL state variables.
I cannot accept this.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0f4f8c73644a9cc436500d605413207c44cfb4ee 27-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Handle loops with loop controls set

The downside of our talloc usage is that we can't really make static
(i.e., not created with new) instances of our IR types. This leads to
a lot of unnecessary dynamic allocation in this patch.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c9039fdb167865547dc9b3828d69b99209344999 02-Sep-2010 Brian Paul <brianp@vmware.com> mesa: fix code generation for ir_unop_sqrt

The CMP instruction needed to be flipped to properly handle
operand==0.

Fixes fd.o bug 29923.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5ad74779cea07cc6a19a52874cdaef8b018e2f1b 02-Sep-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Load all the STATE_VAR elements of a builtin uniform to a temp.

Like the constant handling and the handling of other uniforms, we add
the whole thing to the Parameters, avoiding messy, incomplete logic
for adding just the elements of a builting uniform that get used.
This means that a driver that relies only on ParameterValues[] for its
parameters will have an increased parameter load, but drivers
generally don't do that (since they have other params they need to
handle, too).

Fixes glsl-fs-statevar-call (testcase for Ember). Bug #29687.

Regresses glsl-vs-array-04 on 965. Thanks to a slight change in
register allocation, this test of undefined behavior now wraps around
the register space and unexpectedly reads the constant value it's
trying to compare to. The test should probably not look at the
resulting color, since behavior is undefined.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
500e7b75995460537b0e682e5bde4c32eb40b85c 01-Sep-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add a little helper for emitting link failure messages.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9b075cb9fa9eb6a95d0816283ef01ae72dafa680 31-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: When emitting a pixel kill, flag that we did so.

Both i965 and swrast rely on UsesKill to determine whether to do early
depth writes. Fixes glsl-fs-discard-02.

Bug #29835.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
99f3c9caa39fbe9dfa7561c919202395720e9472 31-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Sort the uniform list we're adding to Parameters[] order.

Fixes glsl-uniform-linking-1 and failure to link a shader in Unigine.
An alternative here would be to just ditch using _mesa_add_parameter
and build the initial params list on our own, but that would require
two walks of the list as well.

Bug #29822
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
2a78807db7a3bc852da0cda1e933a157204c3a47 22-Aug-2010 nobled <nobled@dreamwidth.org> ir_to_mesa: Fix struct/class confusion
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
7406898441bfec937840d575500fb6d43192310d 30-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Set up our instruction nodes with zeroed data.

cond_update wasn't being set by emit_op3, leading to valgrind
complaints, and failures in several piglit tests when built with
clang.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4f189b3bf57a6500953dac49105f160af5fa6468 31-Aug-2010 Marek Olšák <maraeo@gmail.com> ir_to_mesa: use RSQ+MUL instead of RSQ+RCP for SQRT

sqrt(x) = 1/rsq(x) = x*rsq(x)

This optimization already was in the old GLSL compiler.

Acked on irc by Eric Anholt.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4841c0a15adcc722e67d7d246987cd686d3f7a17 30-Aug-2010 José Fonseca <jfonseca@vmware.com> mesa: Return after assertion failure.

Addresses the warnings:
warning: ‘target’ may be used uninitialized in this function
warning: ‘target_string’ may be used uninitialized in this function
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0a46497a4ee3325fab47929cb17cfe2525e1fc33 29-Aug-2010 Vinson Lee <vlee@vmware.com> ir_to_mesa: Initialize variable in ir_to_mesa_visitor::visit.

Fixes piglit glsl-fs-loop valgrind uninitialized value error on softpipe
and llvmpipe.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
264ba1ab88f273dc92add8018f24edcdd67fa5e5 26-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Don't assume that an ir_dereference_array is of a variable.

Fixes:
glsl-array-bounds-02 (software)
glsl-array-bounds-04
glsl-array-bounds-06 (software)
glsl-array-bounds-08
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
aa452e20bff9aea2ecb994c9f7b413b0726a04f3 25-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add support for samplers in structures.

Fixes:
glsl-fs-uniform-sampler-struct
glsl-fs-sampler-numbering-3
Bug #29690
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0924ba0c3496160a134d37cec800f902ae805b9c 24-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Convert this code to using linker.cpp's uniform locations.

Fixes: glsl-fs-uniform-array-4.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ea2231ff5e4ced36bdb65ccdd02a1008fb8bfce7 25-Aug-2010 Eric Anholt <eric@anholt.net> mesa: Remove the "Used" flag in gl_program_parameter.

This was in place for uniform handling, but nothing actually needs the
value now, since presence in a parameter list indicates that the
uniform was used as far as the linker was concerned.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5755d1d6a7ff68c7d690d67c4cd64ef8e01ec2ed 22-Aug-2010 Marek Olšák <maraeo@gmail.com> ir_to_mesa: set IndirectRegisterFiles

This fixes relative addressing of temporaries (and maybe others)
in all gallium drivers.

Acked on irc by Eric Anholt.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
2f5bf20e44d509fa3afbe2cfbb9bb65347daea6a 25-Aug-2010 Eric Anholt <eric@anholt.net> glsl: Set up uniform initializers by walking the shaders after linking.

Previously, uniform initializers were handled by ir_to_mesa as it made
its Parameters list. However, uniform values are global to all
shaders, and the value set in one Parameters list wasn't propagated to
the other gl_program->Parameters lists. By going back through the
general Mesa uniform handling, we make sure that all gl_programs get
updated values, and also successfully separate uniform initializer
handling from ir_to_mesa gl_program generation.

Fixes:
glsl-uniform-initializer-5.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5e9ac94cc44ef4f97063d7b696411b2a4be16f36 23-Aug-2010 Eric Anholt <eric@anholt.net> mesa: Add new ir_unop_any() expression operation.

The previous any() implementation would generate arg0.x || arg0.y ||
arg0.z. Having an expression operation for this makes it easy for the
backend to generate something easier (DPn + SNE for 915 FS, .any
predication on 965 VS)
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
66afcb560771b6ba6ad668156e9f442e86b9a7a2 23-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Implement f2b by comparing the arg to 0, not the result.

Fixes: glsl-fs-any
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
ebef04011736ea8e13692fed87623d425c4d1b08 23-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix constant array handling to return the temp we created.

We ended up returning CONST[loc] rather than TEMP[loc2]. Things would
*usually* end up working out OK, since the constants often ended up
getting allocated to CONST[loc..loc+columns] with no swizzle. But for
the case where the contigous temporary copy of the swizzled constant
vec4 args was actually needed, we'd end up reading some other constant
values, possibly including ones not actually allocated.

Fixes: glsl-varying-mat3x2.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
48c289fb552a3d363b505514b6ea22467f00e318 22-Aug-2010 Vinson Lee <vlee@vmware.com> mesa: Initialize member variables in ir_to_mesa_src_reg constructor.

The default constructor did not initialize some member variables.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
405546882a010885d342b0b40392de0da289374e 22-Aug-2010 Vinson Lee <vlee@vmware.com> mesa: Initialize variables in mesa_src_reg_from_ir_src_reg.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
d6cc7191daa249463b20e2965dc1006288539b1e 20-Aug-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Remove bogus "ambient" field from vec4 gl_TextureEnvColor.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c3e3793c325e36366165a5d1403a8c406ff200db 18-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> glsl: add missing ambient field to gl_LightModel

Again, this is a one-element struct that was incorrectly missing the
field.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fc76d7276393a4617f9898214bc397bb65634b02 18-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> glsl: don't crash if a field is specified for a non-struct uniform

This was triggered by the previous bug, but is a separate problem
in the general sense.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c108a7927d1dad9e0f641a0ec5a7387fb2626156 18-Aug-2010 Luca Barbieri <luca@luca-barbieri.com> glsl: add missing sceneColor field to gl_{Front, Back}LightModelProduct

According to both GLSL 1.20 and 4.0, these are a struct with one field
called "sceneColor".

Fixes a crash on loading in FlightGear.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
af2ef53a2701426d32382e861d8f238a449e9cd9 19-Aug-2010 Eric Anholt <eric@anholt.net> mesa: Fix the whining for link failures to actually be under MESA_GLSL=dump.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
49dfa89873403967d9f99d08d2e25042dea544e0 19-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix leak by improper freeing of a uniform list.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
3cd233eb5714137dccb6218ad78005511bcc02bd 19-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Don't leak the whole linked assembly program.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
3ef83d270b2c24867a0d020b81bdc6c54cb1c9b0 18-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix leak of set_branchtargets temp data.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
850c659044d081c53713800cacf8d518fae6cd70 18-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Stop leaking the ir_instruction * annotation of our compile.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5d0f430e8ed01db29d11d22e4b6c3760d8c39f8f 18-Aug-2010 Eric Anholt <eric@anholt.net> mesa: Free old linked shaders when relinking new shaders.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
abc6d7e0b4b04c75129d24c3cb6f021b92cd46f6 18-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Free the ir_to_mesa temporary storage when we're done.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4a6a4316846ead3ec12759c96ecc4b61491aad65 18-Aug-2010 Eric Anholt <eric@anholt.net> mesa: Hang the compiled shader off the shader->ir, not the shader.

Otherwise, with repeated program recompile, we never free the results
of the previous compile.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0df61bdb669d03d9c25e49d5698f193deca3cf6d 18-Aug-2010 Eric Anholt <eric@anholt.net> mesa: Make MESA_GLSL=dump include when compile/link fails, and the info log.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
35220fc5981045331b4f048f0fc2e1371a0673ed 18-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Allow ir_return in main().

I didn't expect that this would really work, but it turns out there
are shaders in the wild that do it.

Fixes: (with swrast)
glsl-fs-main-return
glsl-vs-main-return
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
6992c3c3739dad249e8c396057d5cbeedcdf91de 18-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix implementation of ir_binop_equal, ir_binop_notequal.

These binops are the vector-to-bool comparisons, not vec-to-bvec. We
likely want both operations avilable as expression, since 915 and 965
FS naturally does the vector version, while 965 VS can also naturally
do the scalar version. However, we can save that until later.

Fixes:
glsl-fs-vec4-operator-equal.shader_test
glsl-fs-vec4-operator-notequal.shader_test
glsl-vs-vec4-operator-equal.shader_test
glsl-vs-vec4-operator-notequal.shader_test
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
1b708d8f4dd1a853de8537e81e6d5bf8c9f2aed1 17-Aug-2010 Eric Anholt <eric@anholt.net> mesa: Dump shader source before validating the shader.

This will make extracting source to produce minimal testcases for
shader compile issues easier.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fc63e37b971b641dfdff000ba353c4810414c20e 16-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Silence unused variable warnings
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
68772031e6242aa78864dc9c7c1a607aec5ee7b9 16-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Clean up assertions in ir_to_mesa_visitor::visit(ir_texture *)
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0bf63733e54b47daf9f50c32a1fca4039c82def2 16-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Support texture rectangle targets
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
19acfa42ed47edb63f5ec3de8051a3102e62e96b 14-Aug-2010 José Fonseca <jfonseca@vmware.com> mesa: Silence gcc warning "control reaches end of non-void function".
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
325aa1b3cd3fa2dcfc936d2024a4493c06f3b3f4 14-Aug-2010 José Fonseca <jfonseca@vmware.com> mesa: Silence gcc warning "missing initializer for member".
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
d19eecef54384c163af27a470496ed885a5a271b 11-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Move ir_to_mesa handling to driver CompileShader and LinkShader hooks.

This lets drivers override ir_to_mesa with their own codegen, or at
least have a native alternative.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
2f4fe151681a6f6afe1d452eece6cf4144f44e49 10-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Move the common optimization passes to a helper function.

These are passes that we expect all codegen to be happy with. The
other lowering passes for Mesa IR are moved to the Mesa IR generator.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
261bbc011d11ab9e390cd5fe9f5151821eefaffa 13-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Use Elements from main/compiler.h instead of open-coding
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5854d4583c6e8885185e12a0636f77489a62e24c 10-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Add a pass to transform ir_binop_sub to add(op0, neg(op1))

All the current HW backends transform subtract to adding the negation,
so I haven't bothered peepholing it back out in Mesa IR. This allows
some subtract of subtract to get removed in ir_algebraic.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
8bebbeb7c5b26ec9166a4644a2c051238d18509b 10-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Add constant propagation.

Whereas constant folding evaluates constant expressions at rvalue
nodes, constant propagation tracks constant components of vectors
across execution to replace (possibly swizzled) variable dereferences
with constant values, triggering possible constant folding or reduced
variable liveness.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
925b49ff310bf0b307add7c34627cddf87e6a554 06-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Move gl_program->InputsRead/OutputsWritten setting to an ir pass.

This lets us handle arrays much better than trying to work backwards
from assembly.

Fixes fbo-drawbuffers-maxtargets on swrast (i965 needs loop unrolling)
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c234d0b25f622a7bdd3c40bc72fdbd59d8494c7c 06-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add support for sampler arrays.

Support for samplers in general is still incomplete -- anything in a
uniform struct will still be broken. But that doesn't appear to be
any different from master.

Fixes:
glsl-fs-uniform-sampler-array.shader_test
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
8d61a23b1a1d0d4b21f0fab64f6d863a8ee3d7f1 06-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Don't assert in a couple of places when encountering sampler arrays.

Fixes glean shaderAPI.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
658e25987fbec3b826f500baa6d4d936b9552b13 06-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Give the expected size for _mesa_add_attribute().

Fixes a failure in glean shaderAPI.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
0a86d766ef0d98abd3373609a637bf137203e994 06-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> ir_to_mesa: Handle texture-array samplers

Fixes piglit test array_texture.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
bc4034b243975089c06c4415d4e26edaaaec7a46 06-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Add a pass to convert exp and log to exp2 and log2.

Fixes ir_to_mesa handling of unop_log, which used the weird ARB_vp LOG
opcode that doesn't do what we want. This also lets the multiplication
coefficients in there get constant-folded, possibly.

Fixes:
glsl-fs-log
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
e995f0e10c9ee51f7c8f8fa2193ff99e1b49e40d 05-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Don't do function inlining until linking.

Optimizations at compile time should generally be done with the goal
of reducing instruction count so that other work, particularly
linking, is less time-consuming if the shader is used multiple times.
However, function inlining increases instruction count for the inlined
function bodies without removing the original function body, since we
don't know if it will be used at link time or not.

Reduces the runtime of linking and executing a Yo Frankie fragment
shader from 0.9 seconds to 0.5 seconds (-45.9%, +/- 2.2%, n=5).
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
8f6a0c9ed985267c2d202cf85d17ac04bddfb9d2 05-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Don't try to dump GLSL IR for a shader that didn't compile.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9de2c4fc8e620ffe7faecd499c82d9d38ec538a6 05-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Remove debug force-enablement of EmitNoIfs.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
455290e4281bf53ce2fe248a2adf5163563c44c8 05-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Print shader source and compiled IR under MESA_GLSL=dump.

While the Mesa IR dumping includes some corresponding GLSL IR for
correlating Mesa IR to GLSL IR, it doesn't completely express it.
This printing includes things like variable declarations and control
flow structure that is hard to read otherwise.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5a7758efbe14dee026245a4f4f4fb3ccf7b2c23b 03-Aug-2010 Ian Romanick <ian.d.romanick@intel.com> glsl2: Add ir_assignment::write_mask and associated methods

Replace swizzles on the LHS with additional swizzles on the RHS and a
write mask in the assignment instruction. As part of this add
ir_assignment::set_lhs. Ideally we'd make ir_assignment::lhs private
to prevent erroneous writes, but that would require a lot of code
butchery at this point.

Add ir_assignment constructor that takes an explicit write mask. This
is required for ir_assignment::clone, but it can also be used in other
places. Without this, ir_assignment clones lose their write masks,
and incorrect IR is generated in optimization passes.

Add ir_assignment::whole_variable_written method. This method gets
the variable on the LHS if the whole variable is written or NULL
otherwise. This is different from
ir->lhs->whole_variable_referenced() because the latter has no
knowledge of the write mask stored in the ir_assignment.

Gut all code from ir_to_mesa that handled swizzles on the LHS of
assignments. There is probably some other refactoring that could be
done here, but that can be left for another day.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fe1918c71c3e387939cef9359d4b31ebc5c11a17 04-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Clean up the mapping of samplers to Mesa's sampler uniforms.

Instead of using a linker-assigned location (since samplers don't
actually take up uniform space, being a link-time choice), use the
sampler's varaible pointer as a hash key.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
952d0f88e1741d51b641be75f7c5a6565e245a69 04-Aug-2010 Eric Anholt <eric@anholt.net> glsl2: Skip talloc_parent in constant_expression of non-constant arrays.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
47f305a4fcd23f859d097c6cc25a739547462939 03-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add support for 1.20 uniform initializers.

Fixes:
glsl-uniform-initializer-1
glsl-uniform-initializer-2
glsl-uniform-initializer-3
glsl-uniform-initializer-4
glsl1-GLSL 1.20 uniform array constructor
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
b10bb527eaf39378da25dd4ad21b1c68ceaa1e2d 03-Aug-2010 Eric Anholt <eric@anholt.net> Initialize a couple of HasIndex2 fields on Mesa IR src regs.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
26675e37bc5a086c6df77946d2dada34dc9129f0 02-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Support for struct uniforms.

Fixes glsl-uniform-struct.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9c02412cdc0270f2b0dc64afe709721e049fd5b0 02-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add a constructor for ir_to_mesa_src_reg.

This helps makes sure we don't miss any new fields, and makes totally
uninitialized src_regs be PROGRAM_UNDEFINED.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
b42519108dc7ab104cf9ade65a508f54a0294406 01-Aug-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add support for MESA_GLSL=log.

This is the option that dumps shader source to files in the current
directory.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
784695442c415cf0be882434a25671ecfb635d34 31-Jul-2010 Eric Anholt <eric@anholt.net> glsl2: Add new tree grafting optimization pass.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
40f57c2becbb2cee7cfb6d6ed49dc1db57987e9a 30-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add the function name as a comment to BGNSUB and ENDSUB.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
806cb9f9528e3c55c157d7e8bbb751b769b6fcb7 30-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Don't emit a duplicate return at the end of a function.

It was harmless, but ugly.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
859fd56245c1d725cacab17a34793d41ea14e867 29-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Respect the driver if it rejects a shader.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
4a962170d7cf4243d6ae156fca20a6167388925d 28-Jul-2010 Eric Anholt <eric@anholt.net> glsl2: Add support for redeclaring layout of gl_FragCoord for ARB_fcc.

Fixes:
glsl-arb-fragment-coord-conventions
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
dc27e7356952984d023e05fef90d0f8c4bb07a09 28-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add remaining state variable (builtin uniforms) support.

Fixes:
glsl1-GL state variable reference (diffuse product)
glsl1-GL state variable reference (gl_FrontMaterial.ambient)
glsl1-GL state variable reference (gl_LightSource[0].diffuse)
glsl1-GL state variable reference (point attenuation)
glsl1-GL state variable reference (point size)
glsl1-linear fog
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9a670c2e9b7e07ba43d175f3bfb23951296794c4 28-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Provide a restricted type size to _mesa_add_uniform.

Fixes:
glsl-uniform-out-of-bounds.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
20c074ae28b310348a6a1920ad0ddf1e5cbb7a46 27-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add support for array constants.

Fixes:
glsl1-GLSL 1.20 array constructor 1
glsl1-GLSL 1.20 array constructor 2
glsl1-GLSL 1.20 array.length()
glsl1-GLSL 1.20 const array constructor 1
glsl1-GLSL 1.20 const array constructor 2
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
66d4c65ee2c311ea0c71c39a28456d0c11798d6b 27-Jul-2010 Eric Anholt <eric@anholt.net> glsl2: Make the dead code handler make its own talloc context.

This way, we don't need to pass in a parse state, and the context
doesn't grow with the number of passes through optimization.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
9a770ee49f8cb82653bb5c1976f7751d9a6b801e 27-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Set the swizzle on constant struct src regs.

MESA_GLSL=nopt now produces believable output for glsl-fs-raytrace.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
fdbaca931a504a70d6fec54e2f85caac6281377d 27-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix stray "break" that broke functions of >1 argument.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
832aad989e3d319a8aaac046aa49df25da134d82 27-Jul-2010 Eric Anholt <eric@anholt.net> glsl2: Add optimization pass for algebraic simplifications.

This cleans up the assembly output of almost all the non-logic tests
glsl-algebraic-*. glsl-algebraic-pow-two needs love (basically,
flattening to a temporary and squaring it).
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
576d01ad8c8b8aa57b4711c98d8e004d4f20fc0b 27-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Fix up handling of void function returns.

void functions have a type of glsl_type::void_type, not a null type.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
c91809e1e4a4fa8884e6588159368ea32431ee0e 27-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Actually allocate the right size for constant matrix temps.
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
5b6890a388d554f06880e88d61c73dcd62c5f141 27-Jul-2010 Eric Anholt <eric@anholt.net> ir_to_mesa: Add support for structure constants.

Fixes:
TPPStreamCompiler::assignOperands
/external/mesa3d/src/mesa/program/ir_to_mesa.cpp
afe125e0a18ac3886c45c7e6b02b122fb2d327b5 27-Jul-2010 Eric Anholt <eric@anholt.net> Merge remote branch 'origin/master' into glsl2

This pulls in multiple i965 driver fixes which will help ensure better
testing coverage during development, and also gets past the conflicts
of the src/mesa/shader -> src/mesa/program move.

Conflicts:
src/mesa/Makefile
src/mesa/main/shaderapi.c
src/mesa/main/shaderobj.h