summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/opt_dead_builtin_varyings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Don't attempt to do dead varying elimination on gl_LastFragData arrays.Francisco Jerez2016-08-241-3/+4
| | | | | | | | | | Apparently this pass can only handle elimination of a single built-in fragment output array, so the presence of gl_LastFragData (which it wouldn't split correctly anyway) could prevent it from splitting the actual gl_FragData array. Just match gl_FragData by name since it's the only built-in it can handle. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* Re-apply "glsl: don't try to lower non-gl builtins as if they were gl_FragData"Ilia Mirkin2016-08-101-1/+2
| | | | | | | | | | | | | If a shader has an output array, it will get treated as though it were gl_FragData and rewritten into gl_out_FragData instances. We only want this to happen on the actual gl_FragData and not everything else. This is a small part of the problem pointed out by the below bug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96765 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* Revert "glsl: don't try to lower non-gl builtins as if they were gl_FragData"Marek Olšák2016-08-081-2/+1
| | | | | | | | | | This reverts commit a37e46323c7e18bec4160f2f66847c10b7041dc1. It broke the game Overlord such that it hung a GCN GNU. While I don't know how the hang happened because of its randomness and gfx corruption precedes it, many of the shaders contain this: out vec4 FragData[gl_MaxDrawBuffers];
* glsl: Separate overlapping sentinel nodes in exec_list.Matt Turner2016-07-261-1/+1
| | | | | | | | | | | I do appreciate the cleverness, but unfortunately it prevents a lot more cleverness in the form of additional compiler optimizations brought on by -fstrict-aliasing. No difference in OglBatch7 (n=20). Co-authored-by: Davin McCall <davmac@davmac.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: don't try to lower non-gl builtins as if they were gl_FragDataIlia Mirkin2016-07-051-1/+2
| | | | | | | | | | | | | | If a shader has an output array, it will get treated as though it were gl_FragData and rewritten into gl_out_FragData instances. We only want this to happen on the actual gl_FragData and not everything else. This is a small part of the problem pointed out by the below bug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96765 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
* glsl/mesa: split gl_shader in twoTimothy Arceri2016-06-301-5/+6
| | | | | | | | | | | | | | | | | There are two distinctly different uses of this struct. The first is to store GL shader objects. The second is to store information about a shader stage thats been linked. The two uses actually share few fields and there is clearly confusion about their use. For example the linked shaders map one to one with a program so can simply be destroyed along with the program. However previously we were calling reference counting on the linked shaders. We were also creating linked shaders with a name even though it is always 0 and called the driver version of the _mesa_new_shader() function unnecessarily for GL shader objects. Acked-by: Iago Toral Quiroga <itoral@igalia.com>
* glsl: only match gl_FragData and not gl_SecondaryFragDataEXTIlia Mirkin2016-06-211-2/+5
| | | | | | | | | | | | | There's special logic around finding gl_FragData. It latches onto any array with FRAG_RESULT_DATA0. However gl_SecondaryFragDataEXT[], added by GL_EXT_blend_func_extended, fits those parameters as well. The real frag data array should have index 0 though, so we can use that to distinguish them. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96617 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1 11.2 12.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: move to compiler/Emil Velikov2016-01-261-0/+606
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>