Closed axefrog closed 9 years ago
Yeah this is wierd I don't see anything wrong here, esp. because other examples work. Do you see debug text in any example? Press F1 to turn on/off stats.
Hmm, F1 doesn't appear to do anything. I do see debug text in cubes, raymarch and others, but not helloworld or metaballs. Also, I was just messing about resizing the helloworld window up and down and then all of a sudden it threw an error: http://screencast.com/t/XXevxHwegFGW
The last few lines in the debug window were:
D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000D207D88A00 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
D3D11: Removing Device.
D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000D207D70F50 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CFA0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D390.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B770.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CEE0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D2D0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8B0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC80.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CFA0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D390.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B770.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CEE0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D2D0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8B0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC80.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CFA0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D390.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC00.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415B770.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415CEE0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415D2D0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E830.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415E8B0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20415EC80.
D3D11 INFO: Destroy ID3D11RenderTargetView: Name="unnamed", Addr=0x000000D207DC5980 [ STATE_CREATION INFO #2097245: DESTROY_RENDERTARGETVIEW]
D3D11 INFO: Destroy ID3D11Texture2D: Name="unnamed", Addr=0x000000D207C66780 [ STATE_CREATION INFO #2097236: DESTROY_TEXTURE2D]
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414B4F0.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414CC60.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414D050.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414E440.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414E730.
First-chance exception at 0x00007FFA658168D8 in example-00-helloworldDebug.exe: Microsoft C++ exception: _com_error at memory location 0x000000D20414EB00.
..\..\..\src\renderer_d3d11.cpp(1292): BGFX CHECK m_swapChain->ResizeBuffers(2 , getBufferWidth() , getBufferHeight() , getBufferFormat() , DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH ) FAILED 0x887a0005
example-00-helloworldDebug.exe has triggered a breakpoint.
I'm having trouble reproducing the second error, it might not be important. Still confused why the first example doesn't display anything though.
What's the version of your driver?
Also you said everything works when you build with MinGW? But not with VS2013?
No, I build with VS2013. I used Make to build the project files, then I opened the VS2013 solution file and went from there.
My driver is the GeForce Game Ready Driver 347.52, on a GTX 670 with 2GB RAM.
Oh wait, I'm on 347.09. I'll do an update and report back.
349.49 works for me. Ah ok about makefile, that's just to generate project files. I was thinking you were building MinGW build...
In the mean time (the download is going slow) is there anything else I can check in debug mode to find out why the debug text or logo image aren't displaying?
Ok, probably an important detail I omitted- I built for x64. I went back, changed it to x86 and the samples work correctly. I want to use x64 though... why do you think the helloworld and metaballs samples would fail to display text when compiled for x64?
Also, the updated driver did not make any difference.
You could grab RenderDoc v0.22 https://renderdoc.org/builds capture frame and see what's going on.
x86 vs x64 by default difference is that x86 defaults to D3D9 and x64 to D3D11. So something is wrong with D3D11. You could force D3D9 everywhere until this gets resolved by setting BGFX_CONFIG_RENDERER_DIRECT3D9=1 in preprocessor settings in bgfx's projects settings.
Ah, so I found a bug then...?
If it doesn't get fixed by updating drivers then might be interesting debugging, since no one ever reported it, so it might be very rare combination of circumstances. Still don't have idea how I would repro it here and hoping that driver update will fix it. :)
I'm happy to help in any way I can. Can share screen, skype, whatever you like. The driver update didn't fix it...
Try this. Change D3D11_MAP_WRITE_DISCARD
to D3D11_MAP_WRITE_NO_OVERWRITE
here:
https://github.com/bkaradzic/bgfx/blob/master/src/renderer_d3d11.cpp#L2374
Yep, that fixed it! I tried both the metaballs and helloworld demo and both displayed correctly.
Just ran another test in release mode this time and it worked fine there too. Thanks for looking into it.
Ok, I'll reopen this issue because it's not really fixed, I just found what's the issue.
Can you try this new fix?
Yep, that works.
Hi, most of the other samples work, but the hello world sample doesn't display anything other than a grey background. The metaballs example is also missing the debug text that's in the screenshot. I built the project from the command line using GNU Make, and that appeared to work without any errors. I then compiled using Visual Studio 2013. Initially it failed to compile complaining about Direct3D9 stuff, but I downloaded the 2010 DirectX SDK and set the environment variable for that, and after that it compiled.
Here's the debug output. I don't see any obvious errors occurring...