History log of /external/mesa3d/src/glsl/ir_set_program_inouts.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/glsl/ir_set_program_inouts.cpp
ce1d2f08f9d08bd5d49b2072a94b3d85e3169fb5 20-Jun-2012 Paul Berry <stereotype441@gmail.com> glsl: Set UsesDFdy appropriately for GLSL shaders.

This patch updates the ir_set_program_inouts_visitor so that it also
sets gl_fragment_program::UsesDFdy.

This is a bit of a hack (since dFdy() isn't an input or an output),
but there's no other obvious visitor to squeeze this functionality
into, and it would be silly to create a brand new visitor just for
this purpose.

v2: use local 'fprog' var to avoid repeated casting.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_set_program_inouts.cpp
bebb0438113efdcc1c2aaed95c70ba87de1d3053 18-Jun-2012 Paul Berry <stereotype441@gmail.com> glsl: Add IsCentroid bitfield to gl_fragment_program.

This bitfield tells the back-ends which of a fragment shader's inputs
require centroid interpolation. It is only set for GLSL fragment
shaders, since assembly fragment shaders don't support centroid
interpolation.

Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/glsl/ir_set_program_inouts.cpp
1256a5dcc86014d48bdc6fd10ea5a2fa11241667 24-Mar-2012 Dave Airlie <airlied@redhat.com> glsl: add support for ARB_blend_func_extended (v3)

This adds index support to the GLSL compiler.

I'm not 100% sure of my approach here, esp without how output ordering
happens wrt location, index pairs, in the "mark" function.

Since current hw doesn't ever have a location > 0 with an index > 0,
we don't have to work out if the output ordering the hw requires is
location, index, location, index or location, location, index, index.
But we have no hw to know, so punt on it for now.

v2: index requires layout - catch and error
setup explicit index properly.

v3: drop idx_offset stuff, assume index follow location

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/glsl/ir_set_program_inouts.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/glsl/ir_set_program_inouts.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/glsl/ir_set_program_inouts.cpp
d00deae3ef3a7828de1e566ad95b3a5b1ab7034d 07-Sep-2011 Eric Anholt <eric@anholt.net> glsl: Fix setting of OutputsWritten for whole array dereference.

We just want to mark the whole thing used, not mark from each element
the whole size in use. Fixes undefined URB entry writes on i965,
which blew up with debugging enabled.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_set_program_inouts.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
b13a2e640f749530d3bf40cbbc30504b1ed58470 09-Dec-2010 Eric Anholt <eric@anholt.net> glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.

If you used a constant array index to access the matrix, we'd flag a
bunch of wrong inputs/outputs as being used because the index was
multiplied by matrix columns and the actual used index was left out.

Fixes glsl-mat-attribute.
/external/mesa3d/src/glsl/ir_set_program_inouts.cpp
7ce186358e881d1e30eda716a8dea73d2dab2ee9 09-Dec-2010 Brian Paul <brianp@vmware.com> glsl: add support for system values and GL_ARB_draw_instanced
/external/mesa3d/src/glsl/ir_set_program_inouts.cpp
bfd7c9ac228c7ed8aec04c3b3aa33f40ee00b035 23-Aug-2010 Chia-I Wu <olv@lunarg.com> glsl: Include main/core.h.

Make glsl include only main/core.h from core mesa.
/external/mesa3d/src/glsl/ir_set_program_inouts.cpp
4532feba14fcf4e39ea6e44dd2b6a290697bbd50 19-Aug-2010 Eric Anholt <eric@anholt.net> glsl: Fix leak-causing typo in destructor that made it another constructor.
/external/mesa3d/src/glsl/ir_set_program_inouts.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/glsl/ir_set_program_inouts.cpp