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

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

Issue 299043003: Adding bindless variants mailbox produce/consume (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix for windows Created 6 years, 6 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 8f2d3f09c3d2b641cae5c739b5221c9519ecc66c..d6b6c976c45c54c90f92c2c70939a18bc744de55 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -3600,6 +3600,19 @@ void GLES2Implementation::ProduceTextureCHROMIUM(GLenum target,
CheckGLError();
}
+void GLES2Implementation::ProduceTextureDirectCHROMIUM(
+ GLuint texture, GLenum target, const GLbyte* data) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glProduceTextureDirectCHROMIUM("
+ << static_cast<const void*>(data) << ")");
+ const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data);
+ DCHECK(mailbox.Verify()) << "ProduceTextureDirectCHROMIUM was passed a "
+ "mailbox that was not generated by "
+ "GenMailboxCHROMIUM.";
+ helper_->ProduceTextureDirectCHROMIUMImmediate(texture, target, data);
+ CheckGLError();
+}
+
void GLES2Implementation::ConsumeTextureCHROMIUM(GLenum target,
const GLbyte* data) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
@@ -3613,6 +3626,25 @@ void GLES2Implementation::ConsumeTextureCHROMIUM(GLenum target,
CheckGLError();
}
+GLuint GLES2Implementation::CreateAndConsumeTextureCHROMIUM(
+ GLenum target, const GLbyte* data) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateAndConsumeTextureCHROMIUM("
+ << static_cast<const void*>(data) << ")");
+ const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data);
+ DCHECK(mailbox.Verify()) << "CreateAndConsumeTextureCHROMIUM was passed a "
+ "mailbox that was not generated by "
+ "GenMailboxCHROMIUM.";
+ GLuint client_id;
+ GetIdHandler(id_namespaces::kTextures)->MakeIds(this, 0, 1, &client_id);
+ helper_->CreateAndConsumeTextureCHROMIUMImmediate(target,
+ client_id, data);
+ if (share_group_->bind_generates_resource())
+ helper_->CommandBufferHelper::Flush();
+ CheckGLError();
+ return client_id;
+}
+
void GLES2Implementation::PushGroupMarkerEXT(
GLsizei length, const GLchar* marker) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
« no previous file with comments | « gpu/command_buffer/client/gles2_cmd_helper_autogen.h ('k') | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698