Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1674573002: UniformMatrix* supports transpose is true in ES3 semantic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused code and add more unittests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index ed487d019faa26d98acc5aa2d0a7f25b8cca3c69..b7bf24aae5310e01fac8c20292497fef5d906399 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -7361,6 +7361,11 @@ void GLES2DecoderImpl::DoUniformMatrix2fv(
const GLfloat* value) {
GLenum type = 0;
GLint real_location = -1;
+ if (transpose && !unsafe_es3_apis_enabled()) {
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_VALUE, "glUniformMatrix2fv", "transpose not FALSE");
+ return;
+ }
if (!PrepForSetUniformByLocation(fake_location,
"glUniformMatrix2fv",
Program::kUniformMatrix2f,
@@ -7377,6 +7382,11 @@ void GLES2DecoderImpl::DoUniformMatrix3fv(
const GLfloat* value) {
GLenum type = 0;
GLint real_location = -1;
+ if (transpose && !unsafe_es3_apis_enabled()) {
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_VALUE, "glUniformMatrix3fv", "transpose not FALSE");
+ return;
+ }
if (!PrepForSetUniformByLocation(fake_location,
"glUniformMatrix3fv",
Program::kUniformMatrix3f,
@@ -7393,6 +7403,11 @@ void GLES2DecoderImpl::DoUniformMatrix4fv(
const GLfloat* value) {
GLenum type = 0;
GLint real_location = -1;
+ if (transpose && !unsafe_es3_apis_enabled()) {
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_VALUE, "glUniformMatrix4fv", "transpose not FALSE");
+ return;
+ }
if (!PrepForSetUniformByLocation(fake_location,
"glUniformMatrix4fv",
Program::kUniformMatrix4f,
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_test_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698