st/wgl: Fix argument of stw_pixelformat_get_info().
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 8 Feb 2012 15:46:28 +0000 (15:46 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 10 Feb 2012 16:23:27 +0000 (16:23 +0000)
stw_pixelformat_get_info takes zero based index, not a 1 based pixel
format number.

src/gallium/state_trackers/wgl/stw_ext_pbuffer.c

index 252d07a..a2224fb 100644 (file)
@@ -82,7 +82,7 @@ wglCreatePbufferARB(HDC _hDC,
    HWND hWnd;
    HDC hDC;
 
-   info = stw_pixelformat_get_info(iPixelFormat);
+   info = stw_pixelformat_get_info(iPixelFormat - 1);
    if (!info) {
       SetLastError(ERROR_INVALID_PIXEL_FORMAT);
       return 0;