vrend: alpha-textures are supported on GLES

Alpha-textures are supported on GLES, unlike on OpenGL core profiles. So
we need to check for the difference here, otherwise we get textures
uploaded as alpha-textures, and then attempted swizzled as if they were
emulated as red-textures.

This fixes the following dEQP test-cases:
dEQP-GLES31.functional.texture.border_clamp.formats.alpha.nearest_size_pot
dEQP-GLES31.functional.texture.border_clamp.formats.alpha.nearest_size_npot
dEQP-GLES31.functional.texture.border_clamp.formats.alpha.linear_size_pot
dEQP-GLES31.functional.texture.border_clamp.formats.alpha.linear_size_npot
dEQP-GLES31.functional.texture.border_clamp.unused_channels.alpha

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Erik Faye-Lund 6 years ago committed by Jakob Bornecrantz
parent 0d6a2439ee
commit 4553faf23a
  1. 2
      src/vrend_renderer.c

@ -608,7 +608,7 @@ bool vrend_is_ds_format(enum virgl_formats format)
bool vrend_format_is_emulated_alpha(enum virgl_formats format) bool vrend_format_is_emulated_alpha(enum virgl_formats format)
{ {
if (!vrend_state.use_core_profile) if (vrend_state.use_gles || !vrend_state.use_core_profile)
return false; return false;
return (format == VIRGL_FORMAT_A8_UNORM || return (format == VIRGL_FORMAT_A8_UNORM ||
format == VIRGL_FORMAT_A16_UNORM); format == VIRGL_FORMAT_A16_UNORM);

Loading…
Cancel
Save