xuxiandi / angleproject

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

Unable to update texture allocated via glTexStorage2D on WinXP (or with non-D3D9ex) #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ToT Chrome hits the following assert:

    msvcr90d.dll!_wassert(const wchar_t * expr=0x52a2eddc, const wchar_t * filename=0x52a2edac, unsigned int lineno=256)  Line 335  C
    libGLESv2.dll!gl::Image::updateSurface(IDirect3DSurface9 * destSurface=0x09b35bc0, int xoffset=0, int yoffset=0, int width=256, int height=256)  Line 256 + 0x46 bytes  C++
>   libGLESv2.dll!gl::Texture2D::commitRect(int level=0, int xoffset=0, int 
yoffset=0, int width=256, int height=256)  Line 1830    C++
    libGLESv2.dll!gl::Texture2D::subImage(int level=0, int xoffset=0, int yoffset=0, int width=256, int height=256, unsigned int format=32993, unsigned int type=5121, int unpackAlignment=4, const void * pixels=0x0d910000)  Line 1842    C++
    libGLESv2.dll!glTexSubImage2D(unsigned int target=3553, int level=0, int xoffset=0, int yoffset=0, int width=256, int height=256, unsigned int format=32993, unsigned int type=5121, const void * pixels=0x0d910000)  Line 5215 + 0x37 bytes    C++
    chrome.dll!gpu::gles2::GLES2DecoderImpl::DoTexSubImage2D(unsigned int target=3553, int level=0, int xoffset=0, int yoffset=0, int width=256, int height=256, unsigned int format=32993, unsigned int type=5121, const void * data=0x0d910000)  Line 6785 + 0x30 bytes   C++
    chrome.dll!gpu::gles2::GLES2DecoderImpl::HandleTexSubImage2D(unsigned int immediate_data_size=0, const gpu::gles2::TexSubImage2D & c={...})  Line 6837  C++
    chrome.dll!gpu::gles2::GLES2DecoderImpl::DoCommand(unsigned int command=383, unsigned int arg_count=11, const void * cmd_data=0x0c9908b0)  Line 2922 + 0xbf8 bytes  C++

when running on windows 7 with D3D9ex disabled . 

The texture in question has been allocated via glTexStorage2DEXT . 

You should be able to reproduce by downloading: 
http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?p
ath=Win/114026/

and replacing the ANGLE libraries with a version using D3D9 (non-ex) . 

Original issue reported on code.google.com by vange...@google.com on 12 Dec 2011 at 8:20

GoogleCodeExporter commented 9 years ago
I've got patches which fix the asserts, but I still can't get anything 
rendering on the d3d9 path… Is it possible there is other stuff missing 
Chrome side for the d3d9 path?

Original comment by dan...@transgaming.com on 13 Dec 2011 at 10:50

GoogleCodeExporter commented 9 years ago
Canaries should be fine, but if you're building chrome yourself from trunk 
there's a bug where D3D9 doesn't work on Vista and up. In theory you should be 
able to use the --disable-image-transport-surface command-line flag, but I 
think in practice you have to edit some code for it to work (add "0 &&" to line 
196 of content/common/gpu/image_transport_surface_win.cc).

Original comment by jbauman@chromium.org on 13 Dec 2011 at 11:01

GoogleCodeExporter commented 9 years ago
Yeah I was trying to use d3d9 on Win7 using the build vangelis linked above.  I 
wasn't getting any errors, just a white page, even when I had the managed 
textures disabled.  If it's known not to work, I'll just get my patches cleaned 
up and committed tomorrow.

Original comment by dan...@transgaming.com on 14 Dec 2011 at 1:13

GoogleCodeExporter commented 9 years ago
For the time being you'll need to run chrome with 
--disble-image-transport-surface if you're using d3d9 (non-ex) on windows 7.  
Al is looking into fixing this.

Original comment by vange...@google.com on 14 Dec 2011 at 10:11

GoogleCodeExporter commented 9 years ago
Should be fixed in r923.

Tested in the current canary build in d3d9 mode on win7 and it seems to be 
working fine now.

Original comment by dan...@transgaming.com on 16 Dec 2011 at 11:36