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

Author: Jesse Natalie <[email protected]>
Date:   Mon Mar 22 11:19:16 2021 -0700

wgl: Fix wglCreatePbufferARB pixel format lookup

All other call sites of stw_pixelformat_get_info pass iPixelFormat as-is,
and stw_pixelformat_get_info also subtracts one internally, so I think
this was just an error.

Reviewed-by: Jose Fonseca <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9760>

---

 src/gallium/frontends/wgl/stw_ext_pbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/frontends/wgl/stw_ext_pbuffer.c 
b/src/gallium/frontends/wgl/stw_ext_pbuffer.c
index 02ccb76e277..2425b20148e 100644
--- a/src/gallium/frontends/wgl/stw_ext_pbuffer.c
+++ b/src/gallium/frontends/wgl/stw_ext_pbuffer.c
@@ -90,7 +90,7 @@ wglCreatePbufferARB(HDC hCurrentDC,
    int textureTarget = WGL_NO_TEXTURE_ARB;
    BOOL textureMipmap = FALSE;
 
-   info = stw_pixelformat_get_info(iPixelFormat - 1);
+   info = stw_pixelformat_get_info(iPixelFormat);
    if (!info) {
       SetLastError(ERROR_INVALID_PIXEL_FORMAT);
       return 0;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to