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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1528163002: Added 64 bit number support in the build gles2 command buffer script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modifyed glClientWaitSync and glWaitSync to use GLuint64 in command buffer Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 5919 matching lines...) Expand 10 before | Expand all | Expand 10 after
5930 GPU_CLIENT_SINGLE_THREAD_CHECK(); 5930 GPU_CLIENT_SINGLE_THREAD_CHECK();
5931 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClientWaitSync(" << sync 5931 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glClientWaitSync(" << sync
5932 << ", " << flags << ", " << timeout << ")"); 5932 << ", " << flags << ", " << timeout << ")");
5933 typedef cmds::ClientWaitSync::Result Result; 5933 typedef cmds::ClientWaitSync::Result Result;
5934 Result* result = GetResultAs<Result*>(); 5934 Result* result = GetResultAs<Result*>();
5935 if (!result) { 5935 if (!result) {
5936 SetGLError(GL_OUT_OF_MEMORY, "ClientWaitSync", ""); 5936 SetGLError(GL_OUT_OF_MEMORY, "ClientWaitSync", "");
5937 return GL_WAIT_FAILED; 5937 return GL_WAIT_FAILED;
5938 } 5938 }
5939 *result = GL_WAIT_FAILED; 5939 *result = GL_WAIT_FAILED;
5940 uint32_t v32_0 = 0, v32_1 = 0;
5941 GLES2Util::MapUint64ToTwoUint32(timeout, &v32_0, &v32_1);
5942 helper_->ClientWaitSync( 5940 helper_->ClientWaitSync(
5943 ToGLuint(sync), flags, v32_0, v32_1, 5941 ToGLuint(sync), flags, timeout, GetResultShmId(), GetResultShmOffset());
5944 GetResultShmId(), GetResultShmOffset());
5945 WaitForCmd(); 5942 WaitForCmd();
5946 GPU_CLIENT_LOG("returned " << *result); 5943 GPU_CLIENT_LOG("returned " << *result);
5947 CheckGLError(); 5944 CheckGLError();
5948 return *result; 5945 return *result;
5949 } 5946 }
5950 5947
5951 void GLES2Implementation::WaitSync( 5948 void GLES2Implementation::WaitSync(
5952 GLsync sync, GLbitfield flags, GLuint64 timeout) { 5949 GLsync sync, GLbitfield flags, GLuint64 timeout) {
5953 GPU_CLIENT_SINGLE_THREAD_CHECK(); 5950 GPU_CLIENT_SINGLE_THREAD_CHECK();
5954 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glWaitSync(" << sync << ", " 5951 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glWaitSync(" << sync << ", "
5955 << flags << ", " << timeout << ")"); 5952 << flags << ", " << timeout << ")");
5956 uint32_t v32_0 = 0, v32_1 = 0; 5953 helper_->WaitSync(ToGLuint(sync), flags, timeout);
5957 GLES2Util::MapUint64ToTwoUint32(timeout, &v32_0, &v32_1);
5958 helper_->WaitSync(ToGLuint(sync), flags, v32_0, v32_1);
5959 CheckGLError(); 5954 CheckGLError();
5960 } 5955 }
5961 5956
5962 void GLES2Implementation::GetInternalformativ( 5957 void GLES2Implementation::GetInternalformativ(
5963 GLenum target, GLenum format, GLenum pname, 5958 GLenum target, GLenum format, GLenum pname,
5964 GLsizei buf_size, GLint* params) { 5959 GLsizei buf_size, GLint* params) {
5965 GPU_CLIENT_SINGLE_THREAD_CHECK(); 5960 GPU_CLIENT_SINGLE_THREAD_CHECK();
5966 GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params); 5961 GPU_CLIENT_VALIDATE_DESTINATION_INITALIZATION(GLint, params);
5967 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetInternalformativ(" 5962 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGetInternalformativ("
5968 << GLES2Util::GetStringRenderBufferTarget(target) << ", " 5963 << GLES2Util::GetStringRenderBufferTarget(target) << ", "
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
6539 CheckGLError(); 6534 CheckGLError();
6540 } 6535 }
6541 6536
6542 // Include the auto-generated part of this file. We split this because it means 6537 // Include the auto-generated part of this file. We split this because it means
6543 // we can easily edit the non-auto generated parts right here in this file 6538 // we can easily edit the non-auto generated parts right here in this file
6544 // instead of having to edit some template or the code generator. 6539 // instead of having to edit some template or the code generator.
6545 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 6540 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
6546 6541
6547 } // namespace gles2 6542 } // namespace gles2
6548 } // namespace gpu 6543 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698