Merge zero textures into the state texture map.
We can treat these textures the same as the rest, saving a bit of
code and complexity cost.
BUG=angle:789
Change-Id: I14b426c817cbe3c5bb737410378b6a80e274689b
Reviewed-on: https://chromium-review.googlesource.com/227711
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
diff --git a/src/libGLESv2/State.cpp b/src/libGLESv2/State.cpp
index 71f32e7..4d28187 100644
--- a/src/libGLESv2/State.cpp
+++ b/src/libGLESv2/State.cpp
@@ -613,14 +613,7 @@
Texture *State::getSamplerTexture(unsigned int sampler, GLenum type) const
{
- const BindingPointer<Texture>& binding = mSamplerTextures.at(type)[sampler];
-
- if (binding.id() == 0) // Special case: 0 refers to default textures held by Context
- {
- return NULL;
- }
-
- return binding.get();
+ return mSamplerTextures.at(type)[sampler].get();
}
GLuint State::getSamplerTextureId(unsigned int sampler, GLenum type) const