Skip to content

glsl/linker: Fix attempts to split up 64bit varyings between slots

There is no code to split up 64bit varying between two slots, this patch adds unused 32bit padding if such case is detected.

Pros: Easy to to wire up;
Cons: May waste 32 bits for 64bit variable (doesn't matter if a single variable, array, vector or matrix).

Was found while fixing #1667 (closed)

The calculations of num_components are moved to take into account calculated starting location to correctly align varying.

There are no tests at the moment. I wrote some tests by hand: GL/piglit@5c65105c but I think the correct approach would be writing a test generator like random_ubo-arb_uniform_buffer_object.py.

Merge request reports