summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authordyen <dyen@chromium.org>2015-08-18 18:16:49 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-19 01:18:03 +0000
commit996e007b9ff92ae218ffa8362266f8b829b0595e (patch)
tree884933abf4e2ab74236606f1d1ddd9b1319c449d /gpu
parent0fe21073da88e4adb011523132c9279943386204 (diff)
downloadchromium_src-996e007b9ff92ae218ffa8362266f8b829b0595e.zip
chromium_src-996e007b9ff92ae218ffa8362266f8b829b0595e.tar.gz
chromium_src-996e007b9ff92ae218ffa8362266f8b829b0595e.tar.bz2
Added suport for integer versions of GetQueryObjectvEXT().
The last remaining functions necessary according to the spec for EXT_disjoint_timer_query is the integer variants of GetQueryObjectuivEXT and GetQueryObjectui64vEXT. R=sievers@chromium.org BUG=345227 Review URL: https://codereview.chromium.org/1283083004 Cr-Commit-Position: refs/heads/master@{#344115}
Diffstat (limited to 'gpu')
-rw-r--r--gpu/GLES2/gl2chromium_autogen.h2
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py12
-rw-r--r--gpu/command_buffer/client/gles2_c_lib_autogen.h18
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc18
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h4
-rw-r--r--gpu/command_buffer/client/gles2_interface_autogen.h4
-rw-r--r--gpu/command_buffer/client/gles2_interface_stub_autogen.h2
-rw-r--r--gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h6
-rw-r--r--gpu/command_buffer/client/gles2_trace_implementation_autogen.h2
-rw-r--r--gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h14
-rw-r--r--gpu/command_buffer/cmd_buffer_functions.txt2
11 files changed, 82 insertions, 2 deletions
diff --git a/gpu/GLES2/gl2chromium_autogen.h b/gpu/GLES2/gl2chromium_autogen.h
index 5ce4f26..ddbfa20 100644
--- a/gpu/GLES2/gl2chromium_autogen.h
+++ b/gpu/GLES2/gl2chromium_autogen.h
@@ -252,7 +252,9 @@
#define glEndQueryEXT GLES2_GET_FUN(EndQueryEXT)
#define glEndTransformFeedback GLES2_GET_FUN(EndTransformFeedback)
#define glGetQueryivEXT GLES2_GET_FUN(GetQueryivEXT)
+#define glGetQueryObjectivEXT GLES2_GET_FUN(GetQueryObjectivEXT)
#define glGetQueryObjectuivEXT GLES2_GET_FUN(GetQueryObjectuivEXT)
+#define glGetQueryObjecti64vEXT GLES2_GET_FUN(GetQueryObjecti64vEXT)
#define glGetQueryObjectui64vEXT GLES2_GET_FUN(GetQueryObjectui64vEXT)
#define glSetDisjointValueSyncCHROMIUM \
GLES2_GET_FUN(SetDisjointValueSyncCHROMIUM)
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index ed7a323..3703769 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -3875,6 +3875,12 @@ _FUNCTION_INFO = {
'gl_test_func': 'glQueryCounter',
'extension': "disjoint_timer_query_EXT",
},
+ 'GetQueryObjectivEXT': {
+ 'gen_cmd': False,
+ 'client_test': False,
+ 'gl_test_func': 'glGetQueryObjectiv',
+ 'extension': "disjoint_timer_query_EXT",
+ },
'GetQueryObjectuivEXT': {
'gen_cmd': False,
'client_test': False,
@@ -3882,6 +3888,12 @@ _FUNCTION_INFO = {
'pepper_interface': 'Query',
'extension': "occlusion_query_EXT",
},
+ 'GetQueryObjecti64vEXT': {
+ 'gen_cmd': False,
+ 'client_test': False,
+ 'gl_test_func': 'glGetQueryObjecti64v',
+ 'extension': "disjoint_timer_query_EXT",
+ },
'GetQueryObjectui64vEXT': {
'gen_cmd': False,
'client_test': False,
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h
index 0a22a5a..d6eae8f 100644
--- a/gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -1160,11 +1160,21 @@ void GL_APIENTRY GLES2GetQueryivEXT(GLenum target,
GLint* params) {
gles2::GetGLContext()->GetQueryivEXT(target, pname, params);
}
+void GL_APIENTRY GLES2GetQueryObjectivEXT(GLuint id,
+ GLenum pname,
+ GLint* params) {
+ gles2::GetGLContext()->GetQueryObjectivEXT(id, pname, params);
+}
void GL_APIENTRY GLES2GetQueryObjectuivEXT(GLuint id,
GLenum pname,
GLuint* params) {
gles2::GetGLContext()->GetQueryObjectuivEXT(id, pname, params);
}
+void GL_APIENTRY GLES2GetQueryObjecti64vEXT(GLuint id,
+ GLenum pname,
+ GLint64* params) {
+ gles2::GetGLContext()->GetQueryObjecti64vEXT(id, pname, params);
+}
void GL_APIENTRY GLES2GetQueryObjectui64vEXT(GLuint id,
GLenum pname,
GLuint64* params) {
@@ -2464,10 +2474,18 @@ extern const NameToFunc g_gles2_function_table[] = {
reinterpret_cast<GLES2FunctionPointer>(glGetQueryivEXT),
},
{
+ "glGetQueryObjectivEXT",
+ reinterpret_cast<GLES2FunctionPointer>(glGetQueryObjectivEXT),
+ },
+ {
"glGetQueryObjectuivEXT",
reinterpret_cast<GLES2FunctionPointer>(glGetQueryObjectuivEXT),
},
{
+ "glGetQueryObjecti64vEXT",
+ reinterpret_cast<GLES2FunctionPointer>(glGetQueryObjecti64vEXT),
+ },
+ {
"glGetQueryObjectui64vEXT",
reinterpret_cast<GLES2FunctionPointer>(glGetQueryObjectui64vEXT),
},
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index dcc2bb6..52df605 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -5021,17 +5021,31 @@ void GLES2Implementation::GetQueryivEXT(
CheckGLError();
}
+void GLES2Implementation::GetQueryObjectivEXT(
+ GLuint id, GLenum pname, GLint* params) {
+ GLuint64 result = 0;
+ if (GetQueryObjectValueHelper("glGetQueryObjectivEXT", id, pname, &result))
+ *params = base::saturated_cast<GLint>(result);
+}
+
void GLES2Implementation::GetQueryObjectuivEXT(
GLuint id, GLenum pname, GLuint* params) {
GLuint64 result = 0;
- if (GetQueryObjectValueHelper("glQueryObjectuivEXT", id, pname, &result))
+ if (GetQueryObjectValueHelper("glGetQueryObjectuivEXT", id, pname, &result))
*params = base::saturated_cast<GLuint>(result);
}
+void GLES2Implementation::GetQueryObjecti64vEXT(
+ GLuint id, GLenum pname, GLint64* params) {
+ GLuint64 result = 0;
+ if (GetQueryObjectValueHelper("glGetQueryObjectiv64vEXT", id, pname, &result))
+ *params = base::saturated_cast<GLint64>(result);
+}
+
void GLES2Implementation::GetQueryObjectui64vEXT(
GLuint id, GLenum pname, GLuint64* params) {
GLuint64 result = 0;
- if (GetQueryObjectValueHelper("glQueryObjectui64vEXT", id, pname, &result))
+ if (GetQueryObjectValueHelper("glGetQueryObjectui64vEXT", id, pname, &result))
*params = result;
}
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index 0fe57a1..5d2a4c1 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -807,8 +807,12 @@ void EndTransformFeedback() override;
void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
+void GetQueryObjectivEXT(GLuint id, GLenum pname, GLint* params) override;
+
void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
+void GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64* params) override;
+
void GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64* params) override;
void SetDisjointValueSyncCHROMIUM() override;
diff --git a/gpu/command_buffer/client/gles2_interface_autogen.h b/gpu/command_buffer/client/gles2_interface_autogen.h
index 7665d02..dc11fb0 100644
--- a/gpu/command_buffer/client/gles2_interface_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_autogen.h
@@ -600,7 +600,11 @@ virtual void BeginTransformFeedback(GLenum primitivemode) = 0;
virtual void EndQueryEXT(GLenum target) = 0;
virtual void EndTransformFeedback() = 0;
virtual void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) = 0;
+virtual void GetQueryObjectivEXT(GLuint id, GLenum pname, GLint* params) = 0;
virtual void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) = 0;
+virtual void GetQueryObjecti64vEXT(GLuint id,
+ GLenum pname,
+ GLint64* params) = 0;
virtual void GetQueryObjectui64vEXT(GLuint id,
GLenum pname,
GLuint64* params) = 0;
diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
index 076af55..2675fea 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -583,7 +583,9 @@ void BeginTransformFeedback(GLenum primitivemode) override;
void EndQueryEXT(GLenum target) override;
void EndTransformFeedback() override;
void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
+void GetQueryObjectivEXT(GLuint id, GLenum pname, GLint* params) override;
void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
+void GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64* params) override;
void GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64* params) override;
void SetDisjointValueSyncCHROMIUM() override;
void InsertEventMarkerEXT(GLsizei length, const GLchar* marker) override;
diff --git a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
index 61ab8a1..c039d1f 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
@@ -787,9 +787,15 @@ void GLES2InterfaceStub::EndTransformFeedback() {}
void GLES2InterfaceStub::GetQueryivEXT(GLenum /* target */,
GLenum /* pname */,
GLint* /* params */) {}
+void GLES2InterfaceStub::GetQueryObjectivEXT(GLuint /* id */,
+ GLenum /* pname */,
+ GLint* /* params */) {}
void GLES2InterfaceStub::GetQueryObjectuivEXT(GLuint /* id */,
GLenum /* pname */,
GLuint* /* params */) {}
+void GLES2InterfaceStub::GetQueryObjecti64vEXT(GLuint /* id */,
+ GLenum /* pname */,
+ GLint64* /* params */) {}
void GLES2InterfaceStub::GetQueryObjectui64vEXT(GLuint /* id */,
GLenum /* pname */,
GLuint64* /* params */) {}
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
index 0156c84..753bd2b 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -583,7 +583,9 @@ void BeginTransformFeedback(GLenum primitivemode) override;
void EndQueryEXT(GLenum target) override;
void EndTransformFeedback() override;
void GetQueryivEXT(GLenum target, GLenum pname, GLint* params) override;
+void GetQueryObjectivEXT(GLuint id, GLenum pname, GLint* params) override;
void GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) override;
+void GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64* params) override;
void GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64* params) override;
void SetDisjointValueSyncCHROMIUM() override;
void InsertEventMarkerEXT(GLsizei length, const GLchar* marker) override;
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
index 99c17ba..24de8af 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
@@ -1686,6 +1686,13 @@ void GLES2TraceImplementation::GetQueryivEXT(GLenum target,
gl_->GetQueryivEXT(target, pname, params);
}
+void GLES2TraceImplementation::GetQueryObjectivEXT(GLuint id,
+ GLenum pname,
+ GLint* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetQueryObjectivEXT");
+ gl_->GetQueryObjectivEXT(id, pname, params);
+}
+
void GLES2TraceImplementation::GetQueryObjectuivEXT(GLuint id,
GLenum pname,
GLuint* params) {
@@ -1693,6 +1700,13 @@ void GLES2TraceImplementation::GetQueryObjectuivEXT(GLuint id,
gl_->GetQueryObjectuivEXT(id, pname, params);
}
+void GLES2TraceImplementation::GetQueryObjecti64vEXT(GLuint id,
+ GLenum pname,
+ GLint64* params) {
+ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GetQueryObjecti64vEXT");
+ gl_->GetQueryObjecti64vEXT(id, pname, params);
+}
+
void GLES2TraceImplementation::GetQueryObjectui64vEXT(GLuint id,
GLenum pname,
GLuint64* params) {
diff --git a/gpu/command_buffer/cmd_buffer_functions.txt b/gpu/command_buffer/cmd_buffer_functions.txt
index 370d049..6ce51c6 100644
--- a/gpu/command_buffer/cmd_buffer_functions.txt
+++ b/gpu/command_buffer/cmd_buffer_functions.txt
@@ -239,7 +239,9 @@ GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenumTransformFee
GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenumQueryTarget target);
GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenumQueryTarget target, GLenumQueryParameter pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLidQuery id, GLenumQueryObjectParameter pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLidQuery id, GLenumQueryObjectParameter pname, GLuint* params);
+GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLidQuery id, GLenumQueryObjectParameter pname, GLint64* params);
GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLidQuery id, GLenumQueryObjectParameter pname, GLuint64* params);
GL_APICALL void GL_APIENTRY glSetDisjointValueSyncCHROMIUM (void);
GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar* marker);