diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-07-04 20:15:08 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-07-05 17:43:57 +0800 |
commit | 982cc0ad8b9076be3c0545fbb8413510cdf68bc2 (patch) | |
tree | b75d8f297f82c56ca98d91b7f0364c19b93ef7cf /utests/compiler_fill_gl_image.cpp | |
parent | 054ac5a1a4c0e2cefcbbbde005c3850d10bf1a02 (diff) | |
download | beignet-982cc0ad8b9076be3c0545fbb8413510cdf68bc2.tar.gz |
CLGL: Refine the hack of gbm extension initialization.
Previous implementation need to refer a EGL internal symbol.
This refinement is also a hack. It just avoid use the EGL internal
symbol, but it does use the internal EGL data structure.
Anyway, before we made some changes to gbm to support our use
model, this ugly method seems the only way to achive sharing
gl 2d/3d textures.
This patch also fix the bug when it failed to get a valid egl
context it may crash.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/compiler_fill_gl_image.cpp')
-rw-r--r-- | utests/compiler_fill_gl_image.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utests/compiler_fill_gl_image.cpp b/utests/compiler_fill_gl_image.cpp index b070b8f8..437fcf4d 100644 --- a/utests/compiler_fill_gl_image.cpp +++ b/utests/compiler_fill_gl_image.cpp @@ -33,6 +33,10 @@ static void compiler_fill_gl_image(void) uint32_t *resultColor; GLuint tex; + if (eglContext == EGL_NO_CONTEXT) { + fprintf(stderr, "There is no valid egl context. Ignore this case.\n"); + return; + } // Setup kernel and images glGenTextures(1, &tex); glBindTexture(GL_TEXTURE_2D, tex); |