summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Nieminen <pauli.nieminen@linux.intel.com>2012-05-19 03:44:13 +0300
committerPauli Nieminen <pauli.nieminen@linux.intel.com>2012-05-21 17:29:00 +0300
commit5f5253a782b33f7d91be5f61e7659be9003a62c6 (patch)
treebb28e82eb4230143f93ce97fadef6b5801c94999
parent8eb8f6446a705c61bd5c4930758a20e758bb30e5 (diff)
dispatch: Allow calling egl without initializing
We can initialize dispatch only when there is current context but egl function calls are required to create the context. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
-rw-r--r--tests/util/gen_dispatch.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py
index 6b8dc542..e7f640f5 100644
--- a/tests/util/gen_dispatch.py
+++ b/tests/util/gen_dispatch.py
@@ -526,7 +526,9 @@ def generate_stub_function(ds):
stub_fn = 'static {0}\n'.format(
f0.c_form('APIENTRY ' + ds.stub_name, anonymous_args = False))
stub_fn += '{\n'
- stub_fn += '\tcheck_initialized();\n'
+ # EGL functions can be called before initialization
+ if not f0.gl_name.startswith('egl'):
+ stub_fn += '\tcheck_initialized();\n'
stub_fn += '\t{0}();\n'.format(ds.resolve_name)
# Output the call to the dispatch function.