Bug 793126 - import ANGLE r1278 to get the fix for ANGLE bug 350, a WebGL crasher - r=jgilbert

This commit is contained in:
Benoit Jacob 2012-10-24 16:26:54 -04:00
parent 3f82bb0aab
commit 2a68548e71
2 changed files with 11 additions and 0 deletions

View File

@ -32,6 +32,9 @@ In this order:
See bug 771406. Adds emulation for faceforward(float,float,float),
which is needed to prevent crashing on Mac+Intel.
angle-r1278.patch
Imports ANGLE r1278, which fixes ANGLE bug 350, a crasher.
In addition to these patches, the Makefile.in files are ours, they're not present in
upsteam ANGLE. Therefore, changes made to the Makefile.in files should not be stored
in the local .patch files.

View File

@ -1912,6 +1912,10 @@ void Texture2D::createTexture()
{
GLsizei width = mImageArray[0].getWidth();
GLsizei height = mImageArray[0].getHeight();
if (!(width > 0 && height > 0))
return; // do not attempt to create d3d textures for nonexistant data
GLint levels = creationLevels(width, height);
D3DFORMAT d3dfmt = mImageArray[0].getD3DFormat();
DWORD d3dusage = GetTextureUsage(d3dfmt, mUsage, false);
@ -2472,6 +2476,10 @@ IDirect3DBaseTexture9 *TextureCubeMap::getBaseTexture() const
void TextureCubeMap::createTexture()
{
GLsizei size = mImageArray[0][0].getWidth();
if (!(size > 0))
return; // do not attempt to create d3d textures for nonexistant data
GLint levels = creationLevels(size, 0);
D3DFORMAT d3dfmt = mImageArray[0][0].getD3DFormat();
DWORD d3dusage = GetTextureUsage(d3dfmt, mUsage, false);