Commit 94ba36a7 by Geoff Lang Committed by Commit Bot

Only bind that native GL texture if it should be complete.

If extensions such as OES_texture_float_linear are not exposed but the native drive still supports them, we don't want to bind the native texture and instead bind a texture that is known to sample like the incomplete texture. BUG=angleproject:1959 Change-Id: I610dbd93bb566c8eb2166488a7494b74da4aa327 Reviewed-on: https://chromium-review.googlesource.com/465090 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 780612a5
...@@ -805,7 +805,13 @@ void StateManagerGL::setGenericShaderState(const gl::ContextState &data) ...@@ -805,7 +805,13 @@ void StateManagerGL::setGenericShaderState(const gl::ContextState &data)
for (GLuint textureUnitIndex : samplerUniform.boundTextureUnits) for (GLuint textureUnitIndex : samplerUniform.boundTextureUnits)
{ {
gl::Texture *texture = state.getSamplerTexture(textureUnitIndex, textureType); gl::Texture *texture = state.getSamplerTexture(textureUnitIndex, textureType);
if (texture != nullptr) const gl::Sampler *sampler = state.getSampler(textureUnitIndex);
const gl::SamplerState &samplerState =
sampler ? sampler->getSamplerState() : texture->getSamplerState();
if (texture != nullptr &&
texture->getTextureState().isSamplerComplete(samplerState, data))
{ {
const TextureGL *textureGL = GetImplAs<TextureGL>(texture); const TextureGL *textureGL = GetImplAs<TextureGL>(texture);
...@@ -829,7 +835,6 @@ void StateManagerGL::setGenericShaderState(const gl::ContextState &data) ...@@ -829,7 +835,6 @@ void StateManagerGL::setGenericShaderState(const gl::ContextState &data)
} }
} }
const gl::Sampler *sampler = state.getSampler(textureUnitIndex);
if (sampler != nullptr) if (sampler != nullptr)
{ {
const SamplerGL *samplerGL = GetImplAs<SamplerGL>(sampler); const SamplerGL *samplerGL = GetImplAs<SamplerGL>(sampler);
......
...@@ -133,7 +133,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap() ...@@ -133,7 +133,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
InsertFormatMapping(&map, GL_RG8, VersionOrExts(3, 0, "GL_ARB_texture_rg"), AlwaysSupported(), VersionOrExts(3, 0, "GL_ARB_texture_rg"), VersionOrExts(3, 0, "GL_EXT_texture_rg"), AlwaysSupported(), VersionOrExts(3, 0, "GL_ARB_texture_rg") ); InsertFormatMapping(&map, GL_RG8, VersionOrExts(3, 0, "GL_ARB_texture_rg"), AlwaysSupported(), VersionOrExts(3, 0, "GL_ARB_texture_rg"), VersionOrExts(3, 0, "GL_EXT_texture_rg"), AlwaysSupported(), VersionOrExts(3, 0, "GL_ARB_texture_rg") );
InsertFormatMapping(&map, GL_RG8_SNORM, VersionOnly(3, 1), AlwaysSupported(), NeverSupported(), VersionOnly(3, 0), AlwaysSupported(), NeverSupported() ); InsertFormatMapping(&map, GL_RG8_SNORM, VersionOnly(3, 1), AlwaysSupported(), NeverSupported(), VersionOnly(3, 0), AlwaysSupported(), NeverSupported() );
InsertFormatMapping(&map, GL_RGB8, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), VersionOrExts(3, 0, "GL_OES_rgb8_rgba8"), AlwaysSupported(), AlwaysSupported() ); InsertFormatMapping(&map, GL_RGB8, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), VersionOrExts(3, 0, "GL_OES_rgb8_rgba8"), AlwaysSupported(), AlwaysSupported() );
InsertFormatMapping(&map, GL_RG8_SNORM, VersionOnly(3, 1), AlwaysSupported(), NeverSupported(), VersionOnly(3, 0), AlwaysSupported(), NeverSupported() ); InsertFormatMapping(&map, GL_RGB8_SNORM, VersionOnly(3, 1), AlwaysSupported(), NeverSupported(), VersionOnly(3, 0), AlwaysSupported(), NeverSupported() );
InsertFormatMapping(&map, GL_RGB565, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported() ); InsertFormatMapping(&map, GL_RGB565, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported() );
InsertFormatMapping(&map, GL_RGBA4, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported() ); InsertFormatMapping(&map, GL_RGBA4, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported() );
InsertFormatMapping(&map, GL_RGB5_A1, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported() ); InsertFormatMapping(&map, GL_RGB5_A1, AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported(), AlwaysSupported() );
......
...@@ -38,51 +38,7 @@ ...@@ -38,51 +38,7 @@
1442 D3D11 : dEQP-GLES31.functional.state_query.shader.sampler_type = SKIP 1442 D3D11 : dEQP-GLES31.functional.state_query.shader.sampler_type = SKIP
// OpenGL Failing Tests // OpenGL Failing Tests
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_only = FAIL 1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_* = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_1.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_2.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_3.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_4.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_8.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_10.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_12.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_13.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_only = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_and_sample_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_and_sample_coverage_and_alpha_to_coverage = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.samples_16.sample_mask_non_effective_bits = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.negative.texture_min_filter = FAIL 1442 OPENGL : dEQP-GLES31.functional.texture.multisample.negative.texture_min_filter = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.negative.texture_mag_filter = FAIL 1442 OPENGL : dEQP-GLES31.functional.texture.multisample.negative.texture_mag_filter = FAIL
1442 OPENGL : dEQP-GLES31.functional.texture.multisample.negative.texture_wrap_s = FAIL 1442 OPENGL : dEQP-GLES31.functional.texture.multisample.negative.texture_wrap_s = FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment