Skip to content

vrend: do not proble for compressed formats

Not all compressed formats can be uploaded using glTexImage2D, that only works if the extension provides an online texture-compressor. For instance, EXT_texture_compression_s3tc only requires an online compressor in the desktop version.

This test isn't really a test for the presence of an online-compressor, this code is meant to test if we can render from it. But calling glCompressedTexImage2D requires us to provide a valid compressed payload, which is really awkward to maintain.

So let's instead just check for extensions to decide if these formats are renderable or not.

Also, none of these compressed formats can be rendered to, so there's no point in even testing for that.

Combined with a commit in mesa that enables EXT_texture_compression_s3tc on GLES 2.0, this makes these dEQP-tests go from NotSupported to Pass on i965:

  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_invalid_target
  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_neg_level_cube
  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_level_max_tex2d
  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_level_max_cube
  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_neg_offset
  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_offset_allowed
  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_neg_wdt_hgt
  • dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_invalid_size

Signed-off-by: Erik Faye-Lund

Merge request reports