mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 665578 - Backed out changeset 82a297b0d0d3 for compile error
This commit is contained in:
parent
54955983e0
commit
70ce6801c5
@ -64,11 +64,6 @@
|
||||
#include "WebGLTexelConversions.h"
|
||||
#include "WebGLValidateStrings.h"
|
||||
|
||||
// needed to check if current OS is lower than 10.7
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
static bool BaseTypeAndSizeFromUniformType(WebGLenum uType, WebGLenum *baseType, WebGLint *unitSize);
|
||||
@ -4422,6 +4417,12 @@ WebGLContext::Viewport(WebGLint x, WebGLint y, WebGLsizei width, WebGLsizei heig
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#define WEBGL_OS_IS_MAC 1
|
||||
#else
|
||||
#define WEBGL_OS_IS_MAC 0
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
WebGLContext::CompileShader(nsIWebGLShader *sobj)
|
||||
{
|
||||
@ -4479,20 +4480,9 @@ WebGLContext::CompileShader(nsIWebGLShader *sobj)
|
||||
|
||||
int compileOptions = SH_OBJECT_CODE;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// work around bug 665578
|
||||
PRInt32 version = 0;
|
||||
OSErr err = ::Gestalt(gestaltSystemVersion, &version);
|
||||
if (err != noErr) {
|
||||
version = 0;
|
||||
} else {
|
||||
version &= 0xFFFF; // The system version is in the lower word.
|
||||
}
|
||||
|
||||
// If earlier than Snow Leopard and has an ATI card.
|
||||
if (version < 0x1070 && gl->Vendor() == gl::GLContext::VendorATI)
|
||||
if (WEBGL_OS_IS_MAC && gl->Vendor() == gl::GLContext::VendorATI)
|
||||
compileOptions |= SH_EMULATE_BUILT_IN_FUNCTIONS;
|
||||
#endif
|
||||
|
||||
if (!ShCompile(compiler, &s, 1, compileOptions)) {
|
||||
int len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user