glsl-optimizer icon indicating copy to clipboard operation
glsl-optimizer copied to clipboard

GLSL optimizer based on Mesa's GLSL compiler. Used to be used in Unity for mobile shader optimization.

Results 51 glsl-optimizer issues
Sort by recently updated
recently updated
newest added

**bug.glsl** ```glsl #version 100 #define SAMPLER_COUNT 2 uniform sampler2D samplers[SAMPLER_COUNT]; void main() { vec4 sum = vec4(0.0); for(int i = 0; i < SAMPLER_COUNT; i++) { sum += samplers[i]; }...

tmpvar_55.xy = ((center_52 + vec3(-0.5, -0.5, 0.0)) / vec2(tmpvar_56));

I was working with a (too) large fragment shader, and due to method inlining this resulted in a very long main() function. On multiple (older, Andoid 5/6, gles2) android devices,...

If const variable initialized with builtin function such as bellowing present in the shader, program will crash: `const vec3 var_test = log(vec3(0.0,0.0,0.0));` Crash stack: ![image](https://user-images.githubusercontent.com/59471937/86337201-591c8380-bc83-11ea-954f-847f62de7318.png)

We are exploring the use of storage buffers in [WebRender](https://github.com/servo/webrender/), and glsl optimizing stage unfortunately doesn't recognize them. Example syntax we use: ```glsl layout(std140, binding = 0) buffer bInstances {...

A include path and a c source file missed in the cmake file.

I am getting following errors while using the optimised shader. ERROR: 0:369: Invalid call of undeclared identifier 'csel_TODO' WARNING: 0:478: Overflow in implicit constant conversion, minimum range for lowp float...

glsl_types::interface_types wasn't being free'd, added cleanup to _mesa_glsl_release_types

In the function ir_print_glsl_visitor::print_precision the following block of code skips writing the default lowp precision when possible: ``` // skip precision for samplers that end up being lowp (default anyway)...