summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/build_gles2_cmd_buffer.py
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 06:03:03 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-14 06:03:03 +0000
commit8ffc2594e4d449f4a8861cee3071c4afbacd9f20 (patch)
treed27a77a7e4e094551d01dad7d56b03ce09e22355 /gpu/command_buffer/build_gles2_cmd_buffer.py
parentda56a47ab4279016cd690e576bee1d81d414aac5 (diff)
downloadchromium_src-8ffc2594e4d449f4a8861cee3071c4afbacd9f20.zip
chromium_src-8ffc2594e4d449f4a8861cee3071c4afbacd9f20.tar.gz
chromium_src-8ffc2594e4d449f4a8861cee3071c4afbacd9f20.tar.bz2
Add check for single threaded access to GLES2Implementation
TEST=none BUG=none Review URL: http://codereview.chromium.org/8879062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/build_gles2_cmd_buffer.py')
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index bdbd683..ece3ddc 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -2369,6 +2369,7 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
self.WriteClientGLCallLog(func, file)
func.WriteDestinationInitalizationValidation(file)
for arg in func.GetOriginalArgs():
@@ -2793,6 +2794,7 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
for arg in func.GetOriginalArgs():
@@ -2871,7 +2873,8 @@ class GENnHandler(TypeHandler):
self.WriteClientGLCallLog(func, file)
for arg in func.GetOriginalArgs():
arg.WriteClientSideValidationCode(file, func)
- code = """ id_handlers_[id_namespaces::k%(resource_type)s]->
+ code = """ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ id_handlers_[id_namespaces::k%(resource_type)s]->
MakeIds(0, %(args)s);
helper_->%(name)sImmediate(%(args)s);
%(log_code)s
@@ -3086,6 +3089,7 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
for arg in func.GetOriginalArgs():
@@ -3116,6 +3120,7 @@ class DeleteHandler(TypeHandler):
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
for arg in func.GetOriginalArgs():
@@ -3235,6 +3240,7 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs) {
'count_name': func.GetOriginalArgs()[0].name,
}
file.Write("%(return_type)s %(name)s(%(typed_args)s) {\n" % args)
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
file.Write(""" GPU_CLIENT_LOG_CODE_BLOCK({
@@ -3402,6 +3408,7 @@ class GETnHandler(TypeHandler):
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
for arg in func.GetOriginalArgs():
@@ -3592,6 +3599,7 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
last_arg_name = func.GetLastOriginalArg().name
@@ -3815,6 +3823,7 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
last_arg_name = func.GetLastOriginalArg().name
@@ -4204,6 +4213,7 @@ TEST_F(%(test_name)s, %(name)sInvalidArgsBadSharedMemoryId) {
file.Write("%s %s(%s) {\n" %
(func.return_type, func.original_name,
func.MakeTypedOriginalArgString("")))
+ file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
func.WriteDestinationInitalizationValidation(file)
self.WriteClientGLCallLog(func, file)
file.Write(" typedef %s::Result Result;\n" % func.name)
@@ -4243,7 +4253,9 @@ class STRnHandler(TypeHandler):
def WriteGLES2ImplementationHeader(self, func, file):
"""Overrriden from TypeHandler."""
- code_1 = "%(return_type)s %(func_name)s(%(args)s) {\n"
+ code_1 = """%(return_type)s %(func_name)s(%(args)s) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+"""
code_2 = """ GPU_CLIENT_LOG("[" << this << "] gl%(func_name)s" << "("
<< %(arg0)s << ", "
<< %(arg1)s << ", "