Bug 50870 - [SNB] eglChooseConfig returns no candidate config
Summary: [SNB] eglChooseConfig returns no candidate config
Status: RESOLVED WORKSFORME
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-08 00:00 UTC by Homer Hsing
Modified: 2012-06-08 10:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Homer Hsing 2012-06-08 00:00:52 UTC
How to reproduce the bug ?

  Step 1: create a C source file
/************* a.c ********************/
#include <EGL/egl.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdio.h>
#include <assert.h>

int main() {
    EGLint major, minor;
    EGLDisplay disp;
    disp = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    assert(disp != EGL_NO_DISPLAY);    
    EGLBoolean b = eglInitialize(disp, &major, &minor);
    assert(b != EGL_FALSE);
    EGLConfig config;
    EGLint numConfigs;
    EGLint attribs[] = {
        EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
        EGL_RED_SIZE, 1,         
        EGL_GREEN_SIZE, 1,       
        EGL_BLUE_SIZE, 1,        
        EGL_NONE                 
    };
    b = eglChooseConfig(disp, attribs, &config, 1, &numConfigs);
    assert(b != EGL_FALSE);
    assert(numConfigs > 0);
    return 0;
}

  Step 2: compile it and run it
   gcc a.c -lEGL -lGLESv2 -Wall
   ./a.out
  We will see the error message:
    a.out: a.c:25: main: Assertion `numConfigs > 0' failed.

What should be the correct output ?
  No error.

Environment:
Linux 3.2.0-24-generic x86_64
Ubuntu 12.04 64 bit latest
Mesa 8.1-devel (git-529476b) latest code from git
Intel Sandybridge Mobile Graphic card
Comment 1 Ian Romanick 2012-06-08 10:15:04 UTC
I cannot reproduce this bug.  You probably don't have the correct drivers or libraries in the LD_LIBRARY_PATH or something.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.