wgl: drop unused member
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Sun, 26 May 2019 08:42:39 +0000 (10:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 2 Apr 2020 09:51:58 +0000 (09:51 +0000)
While we're at it, drop trying to re-calculate the max-size from the
max-level. It's not accurate on any drivers where the max-size isn't a
power of two anyway.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4307>

src/gallium/state_trackers/wgl/stw_device.c
src/gallium/state_trackers/wgl/stw_device.h

index 0636cfcd2cf0242c6d05a350447365d39dec2eff..7c887194b5c73369e2df115c78c0329c17611f59 100644 (file)
@@ -118,9 +118,8 @@ stw_init(const struct stw_winsys *stw_winsys)
    stw_dev->smapi->get_param = stw_get_param;
    stw_dev->screen = screen;
 
-   stw_dev->max_2d_levels = util_last_bit(screen->get_param(screen,
-                                                            PIPE_CAP_MAX_TEXTURE_2D_SIZE));
-   stw_dev->max_2d_length = 1 << (stw_dev->max_2d_levels - 1);
+   stw_dev->max_2d_length = screen->get_param(screen,
+                                              PIPE_CAP_MAX_TEXTURE_2D_SIZE);
 
    InitializeCriticalSection(&stw_dev->ctx_mutex);
    InitializeCriticalSection(&stw_dev->fb_mutex);
index 9f6995f5bef26cc27284f76482d943c4d3d61adf..3e1ffebe708d3e9a9f6d2d61942cd4243b05d515 100644 (file)
@@ -51,7 +51,6 @@ struct stw_device
    struct pipe_screen *screen;
    
    /* Cache some PIPE_CAP_* */
-   unsigned max_2d_levels;
    unsigned max_2d_length;
 
    struct st_api *stapi;