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

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

Issue 2543033002: Add texture swizzle back to command buffer. (Closed)
Patch Set: add swizzle value negative test Created 4 years 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
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3c0f126881452c0bd00de777adffe0901a3d2aa6..d5cede782a79b9cb7410b5cadc25035e273c04eb 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -10526,6 +10526,7 @@ void GLES2DecoderImpl::GetTexParameterImpl(
}
return;
}
+ break;
case GL_TEXTURE_MAX_LEVEL:
if (workarounds().use_shadowed_tex_level_params) {
if (fparams) {
@@ -10535,6 +10536,35 @@ void GLES2DecoderImpl::GetTexParameterImpl(
}
return;
}
+ break;
+ case GL_TEXTURE_SWIZZLE_R:
+ if (fparams) {
+ fparams[0] = static_cast<GLfloat>(texture->swizzle_r());
+ } else {
+ iparams[0] = texture->swizzle_r();
+ }
+ return;
+ case GL_TEXTURE_SWIZZLE_G:
+ if (fparams) {
+ fparams[0] = static_cast<GLfloat>(texture->swizzle_g());
+ } else {
+ iparams[0] = texture->swizzle_g();
+ }
+ return;
+ case GL_TEXTURE_SWIZZLE_B:
+ if (fparams) {
+ fparams[0] = static_cast<GLfloat>(texture->swizzle_b());
+ } else {
+ iparams[0] = texture->swizzle_b();
+ }
+ return;
+ case GL_TEXTURE_SWIZZLE_A:
+ if (fparams) {
+ fparams[0] = static_cast<GLfloat>(texture->swizzle_a());
+ } else {
+ iparams[0] = texture->swizzle_a();
+ }
+ return;
default:
break;
}
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698