Mesa (master): st/wgl: Fix argument of stw_pixelformat_get_info().

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Feb 10 16:23:34 UTC 2012


Module: Mesa
Branch: master
Commit: 6beed86ab8970b57aad8442a3e6bf6410fff13ec
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6beed86ab8970b57aad8442a3e6bf6410fff13ec

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed Feb  8 15:46:28 2012 +0000

st/wgl: Fix argument of stw_pixelformat_get_info().

stw_pixelformat_get_info takes zero based index, not a 1 based pixel
format number.

---

 src/gallium/state_trackers/wgl/stw_ext_pbuffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
index 252d07a..a2224fb 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
@@ -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;




More information about the mesa-commit mailing list