diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2012-12-04 15:09:39 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2013-01-11 18:13:52 -0800 |
commit | a0029021681a61d01e5a4603a32cf1bfdfca1d43 (patch) | |
tree | d6683baaab278e4320cc8989356a484f0025c319 /src/mesa/main/get_hash_params.py | |
parent | 4f1e037acf1daf2eed76d8a3ff5890619723193f (diff) | |
download | external_mesa3d-a0029021681a61d01e5a4603a32cf1bfdfca1d43.zip external_mesa3d-a0029021681a61d01e5a4603a32cf1bfdfca1d43.tar.gz external_mesa3d-a0029021681a61d01e5a4603a32cf1bfdfca1d43.tar.bz2 |
mesa: Fix GL_SHADER_BINARY_FORMATS query
There were two bugs here. First, this and several other queries were
not available in a desktop GL context with GL_ARB_ES2_compatibility.
Second, GL_NUM_SHADER_BINARY_FORMATS returns zero, but
GL_SHADER_BINARY_FORMATS writes one element of data to the buffer. If
NUM is zero, no data should be written.
Fixes piglit test 'arb_get_program_binary-overrun shader'.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/main/get_hash_params.py')
-rw-r--r-- | src/mesa/main/get_hash_params.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 3db820a..1c64a27 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -310,6 +310,8 @@ descriptor=[ [ "MAX_VARYING_VECTORS", "CONTEXT_INT(Const.MaxVarying), extra_ARB_ES2_compatibility_api_es2" ], [ "MAX_VERTEX_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2" ], [ "MAX_FRAGMENT_UNIFORM_VECTORS", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_ES2_compatibility_api_es2" ], + [ "NUM_SHADER_BINARY_FORMATS", "CONST(0), extra_ARB_ES2_compatibility_api_es2" ], + [ "SHADER_BINARY_FORMATS", "CONST(0), extra_ARB_ES2_compatibility_api_es2" ], ]}, # GLES3 is not a typo. @@ -379,14 +381,6 @@ descriptor=[ [ "TEXTURE_EXTERNAL_OES", "LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_OES_EGL_image_external" ], ]}, -# Enums unique to OpenGL ES 2.0 -{ "apis": ["GLES2"], "params": [ -# OES_get_program_binary - [ "NUM_SHADER_BINARY_FORMATS", "CONST(0), NO_EXTRA" ], - [ "SHADER_BINARY_FORMATS", "CONST(0), NO_EXTRA" ], -]}, - - # Remaining enums are only in OpenGL { "apis": ["GL", "GL_CORE"], "params": [ [ "ACCUM_RED_BITS", "BUFFER_INT(Visual.accumRedBits), NO_EXTRA" ], |