mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
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>
This commit is contained in:
parent
35e9c7e082
commit
efd2ae6c0c
1 changed files with 0 additions and 49 deletions
|
|
@ -60,11 +60,8 @@ static struct wgl_egl_config *
|
||||||
wgl_add_config(_EGLDisplay *disp, const struct stw_pixelformat_info *stw_config, int id, EGLint surface_type)
|
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_config *conf;
|
||||||
struct wgl_egl_display *wgl_dpy = wgl_egl_display(disp);
|
|
||||||
_EGLConfig base;
|
_EGLConfig base;
|
||||||
unsigned int double_buffer;
|
unsigned int double_buffer;
|
||||||
int wgl_shifts[4] = { -1, -1, -1, -1 };
|
|
||||||
unsigned int wgl_sizes[4] = { 0, 0, 0, 0 };
|
|
||||||
_EGLConfig *matching_config;
|
_EGLConfig *matching_config;
|
||||||
EGLint num_configs = 0;
|
EGLint num_configs = 0;
|
||||||
EGLint config_id;
|
EGLint config_id;
|
||||||
|
|
@ -76,22 +73,12 @@ wgl_add_config(_EGLDisplay *disp, const struct stw_pixelformat_info *stw_config,
|
||||||
if (stw_config->pfd.iPixelType != PFD_TYPE_RGBA)
|
if (stw_config->pfd.iPixelType != PFD_TYPE_RGBA)
|
||||||
return NULL;
|
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.RedSize = stw_config->pfd.cRedBits;
|
||||||
base.GreenSize = stw_config->pfd.cGreenBits;
|
base.GreenSize = stw_config->pfd.cGreenBits;
|
||||||
base.BlueSize = stw_config->pfd.cBlueBits;
|
base.BlueSize = stw_config->pfd.cBlueBits;
|
||||||
base.AlphaSize = stw_config->pfd.cAlphaBits;
|
base.AlphaSize = stw_config->pfd.cAlphaBits;
|
||||||
base.BufferSize = stw_config->pfd.cColorBits;
|
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) {
|
if (stw_config->pfd.cAccumBits) {
|
||||||
/* Don't expose visuals with the accumulation buffer. */
|
/* Don't expose visuals with the accumulation buffer. */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -518,7 +505,6 @@ static EGLBoolean
|
||||||
wgl_destroy_context(_EGLDisplay *disp, _EGLContext *ctx)
|
wgl_destroy_context(_EGLDisplay *disp, _EGLContext *ctx)
|
||||||
{
|
{
|
||||||
struct wgl_egl_context *wgl_ctx = wgl_egl_context(ctx);
|
struct wgl_egl_context *wgl_ctx = wgl_egl_context(ctx);
|
||||||
struct wgl_egl_display *wgl_dpy = wgl_egl_display(disp);
|
|
||||||
|
|
||||||
if (_eglPutContext(ctx)) {
|
if (_eglPutContext(ctx)) {
|
||||||
stw_destroy_context(wgl_ctx->ctx);
|
stw_destroy_context(wgl_ctx->ctx);
|
||||||
|
|
@ -576,7 +562,6 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf,
|
||||||
struct wgl_egl_display *wgl_dpy = wgl_egl_display(disp);
|
struct wgl_egl_display *wgl_dpy = wgl_egl_display(disp);
|
||||||
struct wgl_egl_context *wgl_ctx = wgl_egl_context(ctx);
|
struct wgl_egl_context *wgl_ctx = wgl_egl_context(ctx);
|
||||||
_EGLDisplay *old_disp = NULL;
|
_EGLDisplay *old_disp = NULL;
|
||||||
struct wgl_egl_display *old_wgl_dpy = NULL;
|
|
||||||
_EGLContext *old_ctx;
|
_EGLContext *old_ctx;
|
||||||
_EGLSurface *old_dsurf, *old_rsurf;
|
_EGLSurface *old_dsurf, *old_rsurf;
|
||||||
_EGLSurface *tmp_dsurf, *tmp_rsurf;
|
_EGLSurface *tmp_dsurf, *tmp_rsurf;
|
||||||
|
|
@ -594,22 +579,10 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf,
|
||||||
if (old_ctx) {
|
if (old_ctx) {
|
||||||
struct stw_context *old_cctx = wgl_egl_context(old_ctx)->ctx;
|
struct stw_context *old_cctx = wgl_egl_context(old_ctx)->ctx;
|
||||||
old_disp = old_ctx->Resource.Display;
|
old_disp = old_ctx->Resource.Display;
|
||||||
old_wgl_dpy = wgl_egl_display(old_disp);
|
|
||||||
|
|
||||||
/* flush before context switch */
|
/* flush before context switch */
|
||||||
wgl_gl_flush();
|
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);
|
stw_unbind_context(old_cctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -647,13 +620,6 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf,
|
||||||
|
|
||||||
/* undo the previous wgl_dpy->core->unbindContext */
|
/* undo the previous wgl_dpy->core->unbindContext */
|
||||||
if (stw_make_current(ddraw, rdraw, cctx)) {
|
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");
|
return _eglError(egl_error, "eglMakeCurrent");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -692,20 +658,6 @@ wgl_make_current(_EGLDisplay *disp, _EGLSurface *dsurf,
|
||||||
if (egl_error != EGL_SUCCESS)
|
if (egl_error != EGL_SUCCESS)
|
||||||
return _eglError(egl_error, "eglMakeCurrent");
|
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;
|
return EGL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -856,7 +808,6 @@ wgl_swap_interval(_EGLDisplay *disp, _EGLSurface *surf, EGLint interval)
|
||||||
static EGLBoolean
|
static EGLBoolean
|
||||||
wgl_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
|
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);
|
struct wgl_egl_surface *wgl_surf = wgl_egl_surface(draw);
|
||||||
|
|
||||||
stw_framebuffer_lock(wgl_surf->fb);
|
stw_framebuffer_lock(wgl_surf->fb);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue