Fix CopyBufferSubData validation.
We were checking readTarget twice, instead of both read and write.
BUG=angle:800
Change-Id: I4096a9c4e0fdec9c77bfc25250923c188d2b43db
Reviewed-on: https://chromium-review.googlesource.com/224102
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index 35c00cc..4f43af5 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -6993,7 +6993,7 @@
return;
}
- if (!gl::ValidBufferTarget(context, readTarget) || !gl::ValidBufferTarget(context, readTarget))
+ if (!gl::ValidBufferTarget(context, readTarget) || !gl::ValidBufferTarget(context, writeTarget))
{
context->recordError(gl::Error(GL_INVALID_ENUM));
return;