Here's a lengthy patch-series that aims to fix a few simple bugs, where invalid enums for texture formats were allowed when they shouldn't be.
In general, this is a pattern of checking ctx->Extensions.FOO_bar instead of _mesa_has_FOO_bar(ctx). The difference is that the former is really just a driver capability, whereas the latter checks if the API is of the right profile and version as well. Generally, this has lead to enums being incorrectly accepted on older versions of the APIs, or in the wrong profile. In particular OpenGL ES 1.x and 2.0 allowed a lot of enums where there's no corresponding extension enabling it. The last five patches are slightly different; they are fixups to version and extension requirements. These were simply noticed while working on this series. I've run this through piglit on i965, and found no regressions. One test was fixed, namely oes_packed_depth_stencil-depth-stencil-texture_gles1. I don't think this is worth back-porting to old releases, as this only prevents broken code from incorrectly working, not the other way around. Erik Faye-Lund (30): mesa/main: make _mesa_has_tessellation return bool mesa/main: rename format-check function mesa/main: clean up S3_s3tc check mesa/main: clean up OES_texture_float_linear check mesa/main: clean up ES2_compatibility check mesa/main: clean up integer texture check mesa/main: use _mesa_has_FOO_bar for compressed format checks mesa/main: do not allow s3tc enums on gles1 mesa/main: do not allow etc2 enums on gles1 mesa/main: do not allow astc enums on gles1 mesa/main: do not allow depth-texture enums on gles1 mesa/main: do not allow stencil-texture enums on gles1 mesa/main: do not allow ARB_texture_rgb10_a2ui enums before gles3 mesa/main: do not allow integer-texture enums before gles3 mesa/main: do not allow ARB_depth_buffer_float enums before gles3 mesa/main: do not allow EXT_packed_float enums before gles3 mesa/main: do not allow rg-textures enums before gles3 mesa/main: do not allow EXT_texture_shared_exponent enums before gles3 mesa/main: do not allow MESA_ycbcr_texture enums on gles mesa/main: do not allow type_2_10_10_10_REV enums before gles3 mesa/main: do not allow floating-point texture enums on gles1 mesa/main: do not allow snorm-texture enums before gles3 mesa/main: do not allow sRGB texture enums before gles3 mesa/main: do not allow EXT_texture_sRGB_R8 enums before gles3 mesa/main: split float-texture support checking in two mesa/main: require EXT_texture_type_2_10_10_10_REV for gles3 mesa/main: require EXT_texture_sRGB for gles3 mesa/st: do not probe for the same texture-formats twice mesa/main: do not require float-texture filtering for es3 mesa/st: require linear interpolation for ARB_texture_float src/mesa/main/context.h | 59 ++++++- src/mesa/main/glformats.c | 221 +++++++++++++------------ src/mesa/main/glformats.h | 6 +- src/mesa/main/teximage.c | 4 +- src/mesa/main/version.c | 8 +- src/mesa/state_tracker/st_extensions.c | 10 +- 6 files changed, 188 insertions(+), 120 deletions(-) -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev