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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1309743005: command_buffer: Implement EXT_blend_func_extended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-05-path-fragment-input-gen
Patch Set: ~ Created 5 years, 4 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/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index c1c400bac15ab4610352d3c9d6e8619fb9112e6d..54396109006a53b43574100ba8be306151956004 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -1360,6 +1360,33 @@ void GLES2Implementation::BindAttribLocation(
CheckGLError();
}
+void GLES2Implementation::BindFragDataLocationEXT(GLuint program,
+ GLuint colorName,
+ const char* name) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindFragDataLocationEXT("
+ << program << ", " << colorName << ", " << name << ")");
+ SetBucketAsString(kResultBucketId, name);
+ helper_->BindFragDataLocationEXTBucket(program, colorName, kResultBucketId);
+ helper_->SetBucketSize(kResultBucketId, 0);
+ CheckGLError();
+}
+
+void GLES2Implementation::BindFragDataLocationIndexedEXT(GLuint program,
+ GLuint colorName,
+ GLuint index,
+ const char* name) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindFragDataLocationEXT("
+ << program << ", " << colorName << ", " << index << ", "
+ << name << ")");
+ SetBucketAsString(kResultBucketId, name);
+ helper_->BindFragDataLocationIndexedEXTBucket(program, colorName, index,
+ kResultBucketId);
+ helper_->SetBucketSize(kResultBucketId, 0);
+ CheckGLError();
+}
+
void GLES2Implementation::BindUniformLocationCHROMIUM(
GLuint program, GLint location, const char* name) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
@@ -1571,6 +1598,35 @@ bool GLES2Implementation::GetProgramivHelper(
return got_value;
}
+GLint GLES2Implementation::GetFragDataIndexEXTHelper(GLuint program,
+ const char* name) {
+ typedef cmds::GetFragDataIndexEXT::Result Result;
+ Result* result = GetResultAs<Result*>();
+ if (!result) {
+ return -1;
+ }
+ *result = -1;
+ SetBucketAsCString(kResultBucketId, name);
+ helper_->GetFragDataIndexEXT(program, kResultBucketId, GetResultShmId(),
+ GetResultShmOffset());
+ WaitForCmd();
+ helper_->SetBucketSize(kResultBucketId, 0);
+ return *result;
+}
+
+GLint GLES2Implementation::GetFragDataIndexEXT(GLuint program,
+ const char* name) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetFragDataIndexEXT(" << program
+ << ", " << name << ")");
+ TRACE_EVENT0("gpu", "GLES2::GetFragDataIndexEXT");
+ GLint loc = share_group_->program_info_manager()->GetFragDataIndex(
+ this, program, name);
+ GPU_CLIENT_LOG("returned " << loc);
+ CheckGLError();
+ return loc;
+}
+
GLint GLES2Implementation::GetFragDataLocationHelper(
GLuint program, const char* name) {
typedef cmds::GetFragDataLocation::Result Result;

Powered by Google App Engine
This is Rietveld 408576698