Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | glsl: move to compiler/ | Emil Velikov | 2016-01-26 | 1 | -103/+0 |
| | | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]> | ||||
* | glsl/cs: Exclude gl_LocalInvocationIndex from builtin variable stripping | Jordan Justen | 2015-09-13 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | | | | We lower gl_LocalInvocationIndex based on the extension spec formula: gl_LocalInvocationIndex = gl_LocalInvocationID.z * gl_WorkGroupSize.x * gl_WorkGroupSize.y + gl_LocalInvocationID.y * gl_WorkGroupSize.x + gl_LocalInvocationID.x; https://www.opengl.org/registry/specs/ARB/compute_shader.txt We need to set this variable in main(), even if gl_LocalInvocationIndex is not referenced by the shader. (It may be used by a linked shader.) Therefore, we can't eliminate it as a dead variable. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> | ||||
* | glsl/cs: Don't strip gl_GlobalInvocationID and dependencies | Jordan Justen | 2015-09-13 | 1 | -0/+14 |
| | | | | | | | | | | | | | | | | We lower gl_GlobalInvocationID based on the extension spec formula: gl_GlobalInvocationID = gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID https://www.opengl.org/registry/specs/ARB/compute_shader.txt We need to set this variable in main(), even if gl_GlobalInvocationID is not referenced by the shader. (It may be used by a linked shader.) Therefore, we can't eliminate these as dead variables. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> | ||||
* | glsl: use the is_gl_identifier() helper in a couple more places | Brian Paul | 2015-01-05 | 1 | -1/+1 |
| | | | | Reviewed-by: Eric Anholt <[email protected]> | ||||
* | glsl: Eliminate unused built-in variables after compilation | Ian Romanick | 2014-09-30 | 1 | -0/+81 |
After compilation (and before linking) we can eliminate quite a few built-in variables. Basically, any uniform or constant (e.g., gl_MaxVertexTextureImageUnits) that isn't used (with one exception) can be eliminated. System values, vertex shader inputs (with one exception), and fragment shader outputs that are not used and not re-declared in the shader text can also be removed. gl_ModelViewProjectMatrix and gl_Vertex are used by the built-in function ftransform. There are some complications with eliminating these variables (see the comment in the patch), so they are not eliminated. Valgrind massif results for a trimmed apitrace of dota2: n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) Before (32-bit): 46 40,661,487,174 75,116,800 68,854,065 6,262,735 0 After (32-bit): 50 40,564,927,443 69,185,408 63,683,871 5,501,537 0 Before (64-bit): 64 37,200,329,700 104,872,672 96,514,546 8,358,126 0 After (64-bit): 59 36,822,048,449 96,526,888 89,113,000 7,413,888 0 A real savings of 4.9MiB on 32-bit and 7.0MiB on 64-bit. v2: Don't remove any built-in with Transpose in the name. v3: Fix comment typo noticed by Anuj. Signed-off-by: Ian Romanick <[email protected]> Suggested-by: Eric Anholt <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Anuj Phogat <[email protected]> Cc: Eric Anholt <[email protected]> |