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

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

Issue 2556623002: Implement GetIntegerv(SAMPLER_BINDING/TRANSFORM_FEEDBACK_BINDING) in command buffer. (Closed)
Patch Set: fix 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 | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('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 4f93174e1a1c68ed35e465a914d6c639e59d9f89..a63478eaffa36b99689a44e6e953dd389bec0b26 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -6725,17 +6725,16 @@ bool GLES2DecoderImpl::GetHelper(
case GL_SAMPLER_BINDING:
*num_written = 1;
if (params) {
- // TODO(vmiura): Need to implement this for ES3 clients. WebGL 2 tracks
- // this on the client side.
- *params = 0;
+ DCHECK_LT(state_.active_texture_unit, state_.sampler_units.size());
+ Sampler* sampler =
+ state_.sampler_units[state_.active_texture_unit].get();
+ *params = sampler ? sampler->client_id() : 0;
}
return true;
case GL_TRANSFORM_FEEDBACK_BINDING:
*num_written = 1;
if (params) {
- // TODO(vmiura): Need to implement this for ES3 clients. WebGL 2 tracks
- // this on the client side.
- *params = 0;
+ *params = state_.bound_transform_feedback->client_id();
}
return true;
case GL_NUM_PROGRAM_BINARY_FORMATS:
@@ -7007,11 +7006,9 @@ void GLES2DecoderImpl::DoBindAttribLocation(GLuint program_id,
// At this point, the program's shaders may not be translated yet,
// therefore, we may not find the hashed attribute name.
// glBindAttribLocation call with original name is useless.
- // So instead, we should simply cache the binding, and then call
+ // So instead, we simply cache the binding, and then call
// Program::ExecuteBindAttribLocationCalls() right before link.
program->SetAttribLocationBinding(name, static_cast<GLint>(index));
- // TODO(zmo): Get rid of the following glBindAttribLocation call.
- glBindAttribLocation(program->service_id(), index, name.c_str());
}
error::Error GLES2DecoderImpl::HandleBindAttribLocationBucket(
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698