ES31: Add state change tests for image
This change adds dirty bit state change tests for image textures.
Meanwhile, syncImages related codes are removed since syncTextures will do
all texture states sync.
Bug: angleproject:3015
Change-Id: I9b299c86af1d589e72c08c5d7c55ac74cc7833aa
Reviewed-on: https://chromium-review.googlesource.com/c/1390596
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index b9b1b4e..d9c948c 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -284,9 +284,7 @@
{
kTexture0SubjectIndex = 0,
kTextureMaxSubjectIndex = kTexture0SubjectIndex + IMPLEMENTATION_MAX_ACTIVE_TEXTURES,
- kImage0SubjectIndex = kTextureMaxSubjectIndex,
- kImageMaxSubjectIndex = kImage0SubjectIndex + IMPLEMENTATION_MAX_IMAGE_UNITS,
- kUniformBuffer0SubjectIndex = kImageMaxSubjectIndex,
+ kUniformBuffer0SubjectIndex = kTextureMaxSubjectIndex,
kUniformBufferMaxSubjectIndex =
kUniformBuffer0SubjectIndex + IMPLEMENTATION_MAX_UNIFORM_BUFFER_BINDINGS,
kSampler0SubjectIndex = kUniformBufferMaxSubjectIndex,
@@ -358,12 +356,6 @@
{
mSamplerObserverBindings.emplace_back(this, samplerIndex);
}
-
- for (angle::SubjectIndex imageIndex = kImage0SubjectIndex; imageIndex < kImageMaxSubjectIndex;
- ++imageIndex)
- {
- mImageObserverBindings.emplace_back(this, imageIndex);
- }
}
void Context::initialize()
@@ -1155,7 +1147,6 @@
{
Texture *tex = mState.mTextures->getTexture(texture);
mGLState.setImageUnit(this, unit, tex, level, layered, layer, access, format);
- mImageObserverBindings[unit].bind(tex);
}
void Context::useProgram(GLuint program)
@@ -8062,10 +8053,6 @@
mGLState.onActiveTextureStateChange(this, index);
mStateCache.onActiveTextureChange(this);
}
- else if (index < kImageMaxSubjectIndex)
- {
- mGLState.onImageStateChange(this, index - kImage0SubjectIndex);
- }
else if (index < kUniformBufferMaxSubjectIndex)
{
mGLState.onUniformBufferStateChange(index - kUniformBuffer0SubjectIndex);