summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-06-10 10:39:28 -0700
committerIan Romanick <[email protected]>2013-06-12 16:30:29 -0700
commitcfa3c5ad828f56559a6cc2de299f993b8e748ea4 (patch)
tree2e1e371b4b7a49a2d8b24d195946bdb3a920d860 /src/mesa/main/teximage.c
parent26d86d26f9f972b19c7040bdb1b1daf48537ef3e (diff)
glsl: Generate smaller values for uniform locations
Previously we would generate uniform locations as (slot << 16) + array_index. We do this to handle applications that assume the location of a[2] will be +1 from the location of a[1]. This resulted in every uniform location being at least 0x10000. The OpenGL 4.3 spec was amended to require this behavior, but previous versions did not require locations of array (or structure) members be sequential. We've now encountered two applications that assume uniform values will be "small." As far as we can tell, these applications store the GLint returned by glGetUniformLocation in a int16_t or possibly an int8_t. THIS BEHAVIOR IS NOT GUARANTEED OR IMPLIED BY ANY VERSION OF OpenGL. Other implementations happen to have both these behaviors (sequential array elements and small values) since OpenGL 2.0, so let's just match their behavior. Fixes "3D Bowling" on Android. NOTE: This is a candidate for stable release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-and-tested-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
0 files changed, 0 insertions, 0 deletions