[Piglit] [PATCH 21/29] dispatch: Allow calling egl without initializing

Pauli Nieminen pauli.nieminen at linux.intel.com
Mon May 21 11:08:56 PDT 2012


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 at linux.intel.com>
---
 tests/util/gen_dispatch.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py
index 6b8dc54..e7f640f 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.
-- 
1.7.5.4



More information about the Piglit mailing list