diff options
author | Jesse Natalie <jenatali@microsoft.com> | 2022-04-28 10:41:12 -0700 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-08-11 10:33:04 -0700 |
commit | 960c0d266319a885106e97798f6ab01a8fdfc258 (patch) | |
tree | 552dcefb43586da9b51297ddb52a1d1de647ad18 | |
parent | 5d45ed80f9662a9cd23413707dd90c72587d9a85 (diff) | |
download | mesa-960c0d266319a885106e97798f6ab01a8fdfc258.tar.gz |
egl/wgl: Delete unused variables/code
Fixes: 3415bf02 ("egl: Add a basic Windows driver")
Suggested-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>
(cherry picked from commit efd2ae6c0c87b8eca3bf0a476a008a16c00c51a2)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/egl/drivers/wgl/egl_wgl.c | 49 |
2 files changed, 1 insertions, 50 deletions
diff --git a/.pick_status.json b/.pick_status.json index f36f29a66b5..3ea327a64ab 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -193,7 +193,7 @@ "description": "egl/wgl: Delete unused variables/code", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3415bf0268884bf3c16d495a4e1afd30d67bc71d" }, diff --git a/src/egl/drivers/wgl/egl_wgl.c b/src/egl/drivers/wgl/egl_wgl.c index d0483e1641a..475c160d9a2 100644 --- a/src/egl/drivers/wgl/egl_wgl.c +++ b/src/egl/drivers/wgl/egl_wgl.c @@ -56,11 +56,8 @@ static struct wgl_egl_config * wgl_add_config(_EGLDisplay *disp, const struct stw_pixelformat_info *stw_config, int id, EGLint surface_type) { struct wgl_egl_config *conf; - struct wgl_egl_display *wgl_dpy = wgl_egl_display(disp); _EGLConfig base; unsigned int double_buffer; - int wgl_shifts[4] = { -1, -1, -1, -1 }; - unsigned int wgl_sizes[4] = { 0, 0, 0, 0 }; _EGLConfig *matching_config; EGLint num_configs = 0; EGLint config_id; @@ -72,22 +69,12 @@ wgl_add_config(_EGLDisplay *disp, const struct stw_pixelformat_info *stw_config, if (stw_config->pfd.iPixelType != PFD_TYPE_RGBA) return NULL; - wgl_sizes[0] = stw_config->pfd.cRedBits; - wgl_sizes[1] = stw_config->pfd.cGreenBits; - wgl_sizes[2] = stw_config->pfd.cBlueBits; - wgl_sizes[3] = stw_config->pfd.cAlphaBits; - base.RedSize = stw_config->pfd.cRedBits; base.GreenSize = stw_config->pfd.cGreenBits; base.BlueSize = stw_config->pfd.cBlueBits; base.AlphaSize = stw_config->pfd.cAlphaBits; base.BufferSize = stw_config->pfd.cColorBits; - wgl_shifts[0] = stw_config->pfd.cRedShift; - wgl_shifts[1] = stw_config->pfd.cGreenShift; - wgl_shifts[2] = stw_config->pfd.cBlueShift; - wgl_shifts[3] = stw_config->pfd.cAlphaShift; - if (stw_config->pfd.cAccumBits) { /* Don't expose visuals with the accumulation buffer. */ return NULL; @@ -469,7 +456,6 @@ static EGLBoolean wgl_destroy_context(_EGLDisplay *disp, _EGLContext *ctx) { struct wgl_egl_context *wgl_ctx = wgl_egl_context(ctx); - struct wgl_egl_display *wgl_dpy = wgl_egl_display(disp); if (_eglPutContext(ctx)) { stw_destroy_context(wgl_ctx->ctx); @@ -523,7 +509,6 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, struct wgl_egl_display *wgl_dpy = wgl_egl_display(disp); struct wgl_egl_context *wgl_ctx = wgl_egl_context(ctx); _EGLDisplay *old_disp = NULL; - struct wgl_egl_display *old_wgl_dpy = NULL; _EGLContext *old_ctx; _EGLSurface *old_dsurf, *old_rsurf; _EGLSurface *tmp_dsurf, *tmp_rsurf; @@ -541,22 +526,10 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, if (old_ctx) { struct stw_context *old_cctx = wgl_egl_context(old_ctx)->ctx; old_disp = old_ctx->Resource.Display; - old_wgl_dpy = wgl_egl_display(old_disp); /* flush before context switch */ wgl_gl_flush(); -#if 0 - if (old_dsurf) - wgl_surf_update_fence_fd(old_ctx, disp, old_dsurf); - - /* Disable shared buffer mode */ - if (old_dsurf && _eglSurfaceInSharedBufferMode(old_dsurf) && - old_wgl_dpy->vtbl->set_shared_buffer_mode) { - old_wgl_dpy->vtbl->set_shared_buffer_mode(old_disp, old_dsurf, false); - } -#endif - stw_unbind_context(old_cctx); } @@ -594,13 +567,6 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, /* undo the previous wgl_dpy->core->unbindContext */ if (stw_make_current(ddraw, rdraw, cctx)) { -#if 0 - if (old_dsurf && _eglSurfaceInSharedBufferMode(old_dsurf) && - old_wgl_dpy->vtbl->set_shared_buffer_mode) { - old_wgl_dpy->vtbl->set_shared_buffer_mode(old_disp, old_dsurf, true); - } -#endif - return _eglError(egl_error, "eglMakeCurrent"); } @@ -639,20 +605,6 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, if (egl_error != EGL_SUCCESS) return _eglError(egl_error, "eglMakeCurrent"); -#if 0 - if (dsurf && _eglSurfaceHasMutableRenderBuffer(dsurf) && - wgl_dpy->vtbl->set_shared_buffer_mode) { - /* Always update the shared buffer mode. This is obviously needed when - * the active EGL_RENDER_BUFFER is EGL_SINGLE_BUFFER. When - * EGL_RENDER_BUFFER is EGL_BACK_BUFFER, the update protects us in the - * case where external non-EGL API may have changed window's shared - * buffer mode since we last saw it. - */ - bool mode = (dsurf->ActiveRenderBuffer == EGL_SINGLE_BUFFER); - wgl_dpy->vtbl->set_shared_buffer_mode(disp, dsurf, mode); - } -#endif - return EGL_TRUE; } @@ -687,7 +639,6 @@ wgl_create_window_surface(_EGLDisplay *disp, _EGLConfig *conf, static EGLBoolean wgl_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw) { - struct wgl_egl_display *wgl_disp = wgl_egl_display(disp); struct wgl_egl_surface *wgl_surf = wgl_egl_surface(draw); stw_framebuffer_lock(wgl_surf->fb); |