[Piglit] [PATCH] ext_image_dma_buf_import/intel_external_sampler_only: fix link error
Dylan Baker
baker.dylan.c at gmail.com
Sat Apr 12 23:55:12 PDT 2014
On Friday, April 11, 2014 07:27:16 PM Jordan Justen wrote:
> Mesa is no longer exporting the symbols of OES_framebuffer_object,
> which caused a link error with this test.
>
> In addition, the test needed additional extension checks.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77295
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Ian Romanick <idr at freedesktop.org>
> Cc: Dylan Baker <baker.dylan.c at gmail.com>
> ---
> .../intel_external_sampler_only.c | 26
> +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-)
>
> diff --git
> a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
> b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c index
> ee23b7f..fa49793 100644
> --- a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
> +++ b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
> @@ -39,6 +39,10 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
>
> PIGLIT_GL_TEST_CONFIG_END
>
> +static PFNGLGENRENDERBUFFERSOESPROC piglit_glGenRenderbuffersOES;
> +static PFNGLBINDRENDERBUFFEROESPROC piglit_glBindRenderbufferOES;
> +static PFNGLDELETERENDERBUFFERSOESPROC piglit_glDeleteRenderbuffersOES;
> +
> static EGLImageKHR
> create_image(unsigned w, unsigned h, int fd, unsigned stride, unsigned
> offset) {
> @@ -80,13 +84,13 @@ try_as_render_buffer(EGLImageKHR img)
> GLuint rbo;
> bool res;
>
> - glGenRenderbuffersOES(1, &rbo);
> - glBindRenderbufferOES(GL_RENDERBUFFER_OES, rbo);
> + piglit_glGenRenderbuffersOES(1, &rbo);
> + piglit_glBindRenderbufferOES(GL_RENDERBUFFER_OES, rbo);
>
> glEGLImageTargetRenderbufferStorageOES(GL_RENDERBUFFER_OES, img);
> res = piglit_check_gl_error(GL_INVALID_OPERATION);
>
> - glDeleteRenderbuffersOES(1, &rbo);
> + piglit_glDeleteRenderbuffersOES(1, &rbo);
>
> return res;
> }
> @@ -138,6 +142,22 @@ piglit_init(int argc, char **argv)
>
> piglit_require_egl_extension("EGL_EXT_image_dma_buf_import");
> piglit_require_egl_extension("EGL_KHR_image_base");
> + piglit_require_extension("GL_OES_EGL_image");
> + piglit_require_extension("GL_OES_framebuffer_object");
> +
> + piglit_glGenRenderbuffersOES =
> + (PFNGLGENRENDERBUFFERSOESPROC)
> + eglGetProcAddress("glGenRenderbuffersOES");
> + piglit_glBindRenderbufferOES =
> + (PFNGLBINDRENDERBUFFEROESPROC)
> + eglGetProcAddress("glBindRenderbufferOES");
> + piglit_glDeleteRenderbuffersOES =
> + (PFNGLDELETERENDERBUFFERSOESPROC)
> + eglGetProcAddress("glDeleteRenderbuffersOES");
> + if (!piglit_glGenRenderbuffersOES ||
> + !piglit_glBindRenderbufferOES ||
> + !piglit_glDeleteRenderbuffersOES)
> + piglit_report_result(PIGLIT_FAIL);
>
> vendor_str = (const char *)glGetString(GL_VENDOR);
> if (strncmp(vendor_str, intel_id, sizeof(intel_id) - 1) != 0) {
This fixes building GLES 1.x tests for me.
Tested-by: Dylan Baker <baker.dylan.c at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140412/dc9abcd2/attachment.sig>
More information about the Piglit
mailing list