lion0406 / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Assertion failure on drawing with non-existent texture #350

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
STR:
 in a DEBUG build of your favorite ANGLE-based browser (I only tried Firefox 16.0a1) try the attached test page.

Expected: no assertion failure
Actual: assertion failure:
Assertion failed: mD3DFormat != D3DFMT_UNKNOWN, file 
c:/Users/bjacob/mozilla-central/gfx/angle/src/libGLESv2/Texture.cpp, line 265

Stack trace (this is using ANGLE r1226):

>   msvcr100d.dll!_NMSG_WRITE(int rterrnum)  Line 217   C
    msvcr100d.dll!abort()  Line 61 + 0x7 bytes  C
    msvcr100d.dll!_wassert(const wchar_t * expr, const wchar_t * filename, unsigned int lineno)  Line 153   C
    libGLESv2.dll!gl::Image::getD3DFormat()  Line 265 + 0x4a bytes  C++
    libGLESv2.dll!gl::Texture2D::createTexture()  Line 1999 + 0xb bytes C++
    libGLESv2.dll!gl::Texture2D::getStorage(bool renderTarget)  Line 2206   C++
    libGLESv2.dll!gl::Texture::getTextureSerial()  Line 1404 + 0xf bytes    C++
    libGLESv2.dll!gl::Context::applyTextures(gl::SamplerType type)  Line 2389 + 0x8 bytes   C++
    libGLESv2.dll!gl::Context::applyTextures()  Line 2360   C++
    libGLESv2.dll!gl::Context::drawArrays(unsigned int mode, int first, int count, int instances)  Line 3025    C++
    libGLESv2.dll!glDrawArrays(unsigned int mode, int first, int count)  Line 2094  C++
    xul.dll!mozilla::gl::GLContext::raw_fDrawArrays(unsigned int mode, int first, int count)  Line 2215 C++
    xul.dll!mozilla::gl::GLContext::fDrawArrays(unsigned int mode, int first, int count)  Line 1202 C++
    xul.dll!mozilla::WebGLContext::DrawArrays(unsigned int mode, int first, int count)  Line 1769   C++

What it seems like is that ANGLE is creating some dummy textures for drawing 
with undefined textures, and this assertion failure is about such a dummy 
texture not having a good D3DFormat.

Original issue reported on code.google.com by jacob.be...@gmail.com on 18 Jul 2012 at 5:59

Attachments:

GoogleCodeExporter commented 9 years ago
I also cannot repro this in Chrome Canary.

Original comment by dan...@transgaming.com on 19 Jul 2012 at 12:44

GoogleCodeExporter commented 9 years ago
Ok, I can reproduce in FF Nightly.  The problem is that we're trying to create 
the default 2D texture (since no texture has been explicitly bound), but the 
default texture has never been defined either.  Will have to ponder how best to 
solve this. 

Original comment by dan...@transgaming.com on 19 Jul 2012 at 1:30

GoogleCodeExporter commented 9 years ago
Assertion should no longer occur in r1278.

Original comment by dan...@transgaming.com on 17 Sep 2012 at 9:31

GoogleCodeExporter commented 9 years ago
Ah, thanks! Will update ASAP.

Original comment by jacob.be...@gmail.com on 12 Oct 2012 at 9:48