Commit a6c95fc6 by Geoff Lang

Pass the texture unit to TextureGL::syncSamplerState.

When syncing the texture's sampler state, make sure the correct texture unit is active. When StateManagerGL syncs the textures, it may not set the active texture if the texture ID has not changed. BUG=angleproject:884 BUG=angleproject:883 BUG=angleproject:1051 Change-Id: Ib22874c22a12b1b9bd68887ac5a449c507e7bdc6 Reviewed-on: https://chromium-review.googlesource.com/298482Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent add8d031
......@@ -485,7 +485,7 @@ gl::Error StateManagerGL::setGenericDrawState(const gl::Data &data)
bindTexture(textureType, textureGL->getTextureID());
}
textureGL->syncSamplerState(texture->getSamplerState());
textureGL->syncSamplerState(textureUnitIndex, texture->getSamplerState());
// TODO: apply sampler object if one is bound
}
......
......@@ -622,7 +622,7 @@ static inline void SyncSamplerStateSwizzle(const FunctionsGL *functions,
}
}
void TextureGL::syncSamplerState(const gl::SamplerState &samplerState) const
void TextureGL::syncSamplerState(size_t textureUnit, const gl::SamplerState &samplerState) const
{
// Callback lamdba to bind this texture only if needed.
bool textureApplied = false;
......@@ -630,6 +630,7 @@ void TextureGL::syncSamplerState(const gl::SamplerState &samplerState) const
{
if (!textureApplied)
{
mStateManager->activeTexture(textureUnit);
mStateManager->bindTexture(mTextureType, mTextureID);
textureApplied = true;
}
......
......@@ -66,7 +66,7 @@ class TextureGL : public TextureImpl
gl::Error setEGLImageTarget(GLenum target, egl::Image *image) override;
void syncSamplerState(const gl::SamplerState &samplerState) const;
void syncSamplerState(size_t textureUnit, const gl::SamplerState &samplerState) const;
GLuint getTextureID() const;
gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
......
......@@ -177,33 +177,6 @@
1051 LINUX : dEQP-GLES2.functional.shaders.functions.array_arguments.copy_global_inout_on_call_fragment = FAIL
1051 LINUX : dEQP-GLES2.functional.shaders.functions.array_arguments.copy_global_inout_on_call_vertex = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.mixed.0 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.mixed.2 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.mixed.3 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.mixed.9 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_2d.1 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_2d.2 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_2d.3 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_2d.5 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_2d.6 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_2d.9 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_cube.0 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_cube.1 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_cube.2 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_cube.3 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_cube.5 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_cube.6 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.2_units.only_cube.9 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.4_units.mixed.4 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.4_units.mixed.6 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.4_units.mixed.9 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.4_units.only_2d.6 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.4_units.only_cube.1 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.4_units.only_cube.6 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.4_units.only_cube.8 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.8_units.mixed.0 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.8_units.only_2d.4 = FAIL
1051 LINUX : dEQP-GLES2.functional.texture.units.8_units.only_cube.0 = FAIL
1051 LINUX : dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.basic_array.sampler2D_both = FAIL
1051 LINUX : dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.basic_array.sampler2D_fragment = FAIL
504 LINUX : dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.sampler2D_samplerCube_fragment = 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