summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2019-09-06 12:21:01 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2019-09-06 12:21:01 +0100
commit8b3c91f306ad808a3c948cc57eb222a0e39edbda (patch)
tree7507909111381f2489a8e8b8421c1750bd1524ad
parent9cde3553d63cca220553250d4cff0f6570514789 (diff)
parent9f913b63b57686ebad70fef8e326b4651a507eac (diff)
Merge branch 'cygwin-patches-for-1.20' into cygwin-release-1.20xserver-cygwin-1.20.5-3
-rw-r--r--hw/xwin/InitOutput.c7
-rw-r--r--hw/xwin/glx/indirect.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 53ba658d9..47dc30cd5 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -115,11 +115,9 @@ static PixmapFormatRec g_PixmapFormats[] = {
};
static const ExtensionModule xwinExtensions[] = {
-#ifdef GLXEXT
#ifdef XWIN_WINDOWS_DRI
{ WindowsDRIExtensionInit, "Windows-DRI", &noDriExtension },
#endif
-#endif
};
/*
@@ -133,10 +131,11 @@ void XwinExtensionInit(void)
if (g_fNativeGl) {
/* install the native GL provider */
glxWinPushNativeProvider();
+
+ /* load the Windows-DRI extension */
+ LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
}
#endif
-
- LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
}
#if defined(DDXBEFORERESET)
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index dfce17784..4648fc5cd 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -1695,6 +1695,9 @@ GetShift(int mask)
{
int shift = 0;
+ if (!mask)
+ return 0;
+
while ((mask &1) == 0) {
shift++;
mask >>=1;