summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_dead_builtin_varyings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: fix crash introduced by the previous commitMarek Olšák2013-10-301-1/+1
|
* glsl: break the gl_FragData array into separate gl_FragData[i] variablesMarek Olšák2013-10-291-33/+134
| | | | | | | | | | | | | | | | This avoids a defect in lower_output_reads. The problem is lower_output_reads treats the gl_FragData array as a single variable. It first redirects all output writes to a temporary variable (array) and then writes the whole temporary variable to the output, generating assignments to all elements of gl_FragData. BTW this pass can be modified to lower all arrays, not just inputs and outputs. The question is whether it is worth it. Reviewed-by: Paul Berry <stereotype441@gmail.com> v2: addressed Paul Berry's comments
* glsl: Hide many classes local to individual .cpp files in anon namespaces.Eric Anholt2013-09-231-0/+2
| | | | | | | | This gives the compiler the chance to inline and not export class symbols even in the absence of LTO. Saves about 60kb on disk. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@.intel.com>
* glsl: remove struct keyword from ir_variable declarationsBrian Paul2013-09-091-4/+4
| | | | | | To silence MSVC warnings. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: don't eliminate texcoords that can be set by GL_COORD_REPLACEMarek Olšák2013-08-181-8/+19
| | | | | | | | | Tested by examining generated TGSI shaders from piglit/glsl-routing. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Henri Verbeet <hverbeet@gmail.com> Tested-by: Henri Verbeet <hverbeet@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Ensure snprintf is defined on MSVC builds.José Fonseca2013-07-031-0/+1
| | | | | | | Should fix: src\glsl\opt_dead_builtin_varyings.cpp(244) : error C3861: 'snprintf': identifier not found ...
* glsl/linker: eliminate unused and set-but-unused built-in varyingsMarek Olšák2013-07-021-0/+476
This eliminates built-in varyings such as gl_Color, gl_SecondaryColor, gl_TexCoord, and gl_FogFragCoord if they are unused by the next stage or not written at all (e.g. gl_TexCoord elements). The gl_TexCoord array is broken down into separate vec4s if needed. v2: - use a switch statement in varying_info_visitor::visit(ir_variable*) - use snprintf - disable the optimization for GLES2 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>