diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-03-30 09:17:20 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-03-30 11:20:53 +0800 |
commit | c1a392ac4c6a7da4026653de556c2c7698f86860 (patch) | |
tree | fb27ed7f708fa648e190a44242d26bdd48146686 /src/gallium/state_trackers/glx/xlib/glx_api.c | |
parent | 8c6f71e01e40075156c8b83f2c5e15ab73e66036 (diff) |
st/glx: Remove a wrong assertion in choose_pixel_format.
There are X visuals that Gallium or the code does not support. We could
not assert the color format to be supported. Return PIPE_FORMAT_NONE in
such cases and let the caller handle it.
Diffstat (limited to 'src/gallium/state_trackers/glx/xlib/glx_api.c')
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/glx_api.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c index 4930cd6cd5..eb8d6a1933 100644 --- a/src/gallium/state_trackers/glx/xlib/glx_api.c +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c @@ -1758,6 +1758,10 @@ glXGetFBConfigs( Display *dpy, int screen, int *nelements ) } for (i = 0; i < *nelements; i++) { results[i] = create_glx_visual(dpy, visuals + i); + if (!results[i]) { + *nelements = i; + break; + } } return (GLXFBConfig *) results; } |