Comments (7)
There is bug in those validation layers. So you can disable validation and it will work.
I see. Yeah, I can see that this change here makes D3D12 in debug mode completely crash:
Line 839 in 17f7730
debug1->SetEnableSynchronizedCommandQueueValidation(false);
seems to be the culprit. If I revert that change and just have debug1->SetEnableGPUBasedValidation(true)
on, everything works great & debug doesn't have to be off.
It seems that this fix broke D3D12 completely in debug mode.
from bgfx.
Hi!
Hey @kingscallop do you know how to find text of this bug number? It seems their Discord channel is gone.
(436b7fa?diff=unified#r127893892)
The discord server can be reached here: discord.gg/directx
I went there and asked about the status of the bug '26131261' here is the reply:
Adam Miles
Jesse pointed me to the archive. The bug was fixed in July 2020, so, long since fixed in both Windows and Agility SDKs.Jesse Natalie
I expect a fix date around then would mean fixed in Win11, but not Win10
Unless using the Agility SDK of course
From their reply it seems the bug has been fixed, so these lines can be reverted from:
// debug1->SetEnableGPUBasedValidation(true);
// https://discordapp.com/channels/590611987420020747/593519198995742733/703642988345032804
// D3D12 Bug Number: 26131261
// There is a bug in the D3D12 validation that causes example-21 to fail when using UAV
// Setting this function below to false avoids the bug
debug1->SetEnableSynchronizedCommandQueueValidation(false);
to:
// debug1->SetEnableGPUBasedValidation(true);
// debug1->SetEnableSynchronizedCommandQueueValidation(true);
from bgfx.
This issue is related to #3059 which for some reason was erroneously disregarded as not a bug and moved to discussions as a question. This is most certainly, however, a bug.
Provide full stack.
from bgfx.
ucrtbase.dll!abort() Unknown
ucrtbase.dll!terminate() Unknown
ucrtbase.dll!FindHandler<__FrameHandler3>() Unknown
ucrtbase.dll!__InternalCxxFrameHandler<class __FrameHandler3>(struct EHExceptionRecord *,unsigned __int64 *,struct _CONTEXT *,struct _xDISPATCHER_CONTEXT *,struct _s_FuncInfo const *,int,unsigned __int64 *,unsigned char) Unknown
ucrtbase.dll!__CxxFrameHandler3() Unknown
ntdll.dll!RtlpExecuteHandlerForException() Unknown
ntdll.dll!RtlDispatchException() Unknown
ntdll.dll!KiUserExceptionDispatch() Unknown
KernelBase.dll!RaiseException() Unknown
ucrtbase.dll!_CxxThrowException() Unknown
d3d12SDKLayers.dll!std::_Throw_bad_optional_access(void) Unknown
d3d12SDKLayers.dll!NDebug::CCommandQueue::ValidateResourceStateBarriers(class NDebug::CInterfaceSentinel::CFunctionSentinel &,class NDebug::CCastableCommandList<struct ID3D12CommandList> *,class NDebug::CCastableCommandList<struct ID3D12CommandList> *) Unknown
d3d12SDKLayers.dll!NDebug::CCommandQueue::ExecuteCommandListsImpl(class NDebug::CInterfaceSentinel::CFunctionSentinel &,unsigned int,struct ID3D12CommandList * const *,class NDebug::CCastableCommandList<struct ID3D12CommandList> * const *) Unknown
d3d12SDKLayers.dll!NDebug::CCommandQueue::ExecuteCommandLists(unsigned int,struct ID3D12CommandList * const *) Unknown
> example-00-helloworldDebug.exe!bgfx::d3d12::CommandQueueD3D12::kick() Line 4043 C++
example-00-helloworldDebug.exe!bgfx::d3d12::RendererContextD3D12::submit(bgfx::Frame * _render, bgfx::ClearQuad & __formal, bgfx::TextVideoMemBlitter & _textVideoMemBlitter) Line 6498 C++
example-00-helloworldDebug.exe!bgfx::Context::renderFrame(int _msecs) Line 2471 C++
example-00-helloworldDebug.exe!bgfx::renderFrame(int _msecs) Line 1491 C++
example-00-helloworldDebug.exe!entry::Context::run(int _argc, const char * const * _argv) Line 523 C++
example-00-helloworldDebug.exe!main(int _argc, const char * const * _argv) Line 1192 C++
example-00-helloworldDebug.exe!invoke_main() Line 79 C++
example-00-helloworldDebug.exe!__scrt_common_main_seh() Line 288 C++
example-00-helloworldDebug.exe!__scrt_common_main() Line 331 C++
example-00-helloworldDebug.exe!mainCRTStartup(void * __formal) Line 17 C++
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
EDIT:
If it's helpful, I'm also attaching my DXDiag output
DxDiag.txt
EDIT 2:
The same project builds and runs absolutely fine on D3D12 on Release configuration:
from bgfx.
There is bug in those validation layers. So you can disable validation and it will work.
Here:
KernelBase.dll!RaiseException() Unknown
ucrtbase.dll!_CxxThrowException() Unknown
d3d12SDKLayers.dll!std::_Throw_bad_optional_access(void) Unknown
>>>> d3d12SDKLayers.dll!NDebug::CCommandQueue::ValidateResourceStateBarriers(class NDebug::CInterfaceSentinel::CFunctionSentinel &,class NDebug::CCastableCommandList<struct ID3D12CommandList> *,class NDebug::CCastableCommandList<struct ID3D12CommandList> *) Unknown
d3d12SDKLayers.dll!NDebug::CCommandQueue::ExecuteCommandListsImpl(class NDebug::CInterfaceSentinel::CFunctionSentinel &,unsigned int,struct ID3D12CommandList * const *,class NDebug::CCastableCommandList<struct ID3D12CommandList> * const *) Unknown
d3d12SDKLayers.dll!NDebug::CCommandQueue::ExecuteCommandLists(unsigned int,struct ID3D12CommandList * const *) Unknown
from bgfx.
It seems that this fix broke D3D12 completely in debug mode.
That fix was introduced 3 years ago. Don't assume that things are static... And bug is inside D3D12, not bgfx, this was work around another issue.
436b7fa#diff-001017d02e7808ecc953fdb7b17a87e856a26ba6a3b153dd10dcfee90b60f011
from bgfx.
Ah, yes. Not making any assumptions. Just observing that rolling back the fix makes Debug work fine.
from bgfx.
Related Issues (20)
- D3D12: Unhandled exception when creating more than 64 samplers HOT 5
- Visual corruption using bgfx-nanovg renderer HOT 4
- Clean macOS build of examplesDebug crashes with [MTLRenderPipelineReflectionInternal vertexBindings] exception HOT 6
- Vulkan renderer crashes after only a couple thousand draw calls. HOT 12
- One test fails HOT 4
- Dynamic vertex buffers getting overwritten after bgfx::update HOT 19
- With GL renderer and wayland, switching to full screen with crtl-f results in nothing (nvidia) or not much (amd) being rendered HOT 2
- Blitting between two textures with BackbufferRatio sizes crashes when window is resized
- xx-splat - 3D Gaussian Splatting for Real-Time Radiance Field Rendering HOT 11
- Vulkan fail to create swapchain on Wayland (Call to a X11 function ?) HOT 9
- Small fix on soname defining on ldflags for Android examples. HOT 2
- Crash on linux (default backend - vulkan) with custom window handle and native display is NULL HOT 6
- Shaderc.cpp incorrectly adds PSSL preamble to compute shader HOT 1
- macOS version compatibility HOT 2
- Bad Vulkan performance due to weak index/vertex buffer management HOT 1
- Crash on resize: Nvidia RTX 4090 + Vulkan + Linux HOT 3
- Metal: example-01-helloworld corrupted render when MSAA is enabled HOT 2
- Shifted window buffer location when resizing a window HOT 1
- Vulkan Backend - incorrect mipmap generation for cubemap frame buffers. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bgfx.