Closed ChemistAion closed 3 years ago
As a mentioned before, I am signing shaders with dxil.dll from SDK 10.0.19041.0
There is a PSO for mipmapping all possible DXGI formats, but shader code is the same for all of them. So even for int formats it currently outputs a float. Its not really an issue now as I dont currently use int formats.
But if some format fails(66 for example, DXGI_FORMAT_R1_UNORM), just remove it from ALL_RT_FORMATS in DirectXFramework/SIG/PSO.h
And please write here what formats are unsupported for you. (I have GTX 1080 and everything is created fine, maybe need to check on another drivers)
I wanted to ask you (just now), if I should dig deeper, but you were faster with the responce.. :) Perhaps "studio driver" here it's the issue... I will check it.
FYI: I have just moved to the latest "GameReady" driver: 460.89 - same issue... I assume that you are in Windows-Developer mode, right? I will follow your point on "ALL_RT_FORMATS" now...
Yes, I'm in dev mode. Tried to disable it - getting errors about unsigned code. I'll investigate it.
I just provide dxil.dll from the latest SDK: 'conf.TargetCopyFiles.Add(@"[project.SourceRootPath]\dxil.dll");' to your 'main.sharpmake.cs' -> 'DirectXFramework : Library :: ConfigureAll'
Checked it - getting the same issues with formats... fixing :)
Eventually, do the post-compile shader signing, since there is no "direct" way to do this (no dxil sources): https://www.wihlidal.com/blog/pipeline/2018-09-16-dxil-signing-post-compile/
In my own engine, I have both ways... but "normally" I am just providing dxil.dll
BTW: Because of that (signed/unsigned shaders during windows-dev-mode) you should imporve your 'ComputePipelineState::on_change()' error handling...
Now, it will try (twice) to do Device::get().get_native_device()->CreateComputePipelineState(...)
and it will get 'E_INVALIDARG' with unsigned shader outside windows-dev-mode.
Yeah... need to include signing flag to shader header to make them with 2 versions.
Fixed in c5154f0
Delete pso + cache/ + assets/ to rebuild shaders. Don't have any checks for it for now.
Perfect, works in non-dev
Props for pointing me up Aftermath lib, interesting...
I have a pagefault while voxelizing the static scene sometimes... definitely broke something :)
FYI This workstation, I am working with has:
First, during 'std::make_shared()' there is a massive D3D12 WARNING flood (many of these):
D3D12 WARNING: ID3D12Device::CreateGraphicsPipelineState: Pixel Shader output 'SV_Target0' has float type, while the corresponding RenderTarget slot [0] has format (R16G16_TYPELESS) with component(s) of signed or unsigned integer type. This happens to be well defined: the raw bits output from the shader starting from the least significant bit will simply be dumped to the output storage without any data conversion. This warning is to check that the application developer really intended to rely on this behavior. [ STATE_CREATION WARNING #677: CREATEGRAPHICSPIPELINESTATE_PS_OUTPUT_TYPE_MISMATCH]
Finally, it fails with: D3D12 ERROR: ID3D12Device::CreateGraphicsPipelineState: Failed to determine format support for format 66 [ STATE_CREATION ERROR #676: CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING] D3D12 ERROR: ID3D12Device::CreateGraphicsPipelineState: The specified sample count or quality is not supported with the render target format in slot 0 [ STATE_CREATION ERROR #685: CREATEGRAPHICSPIPELINESTATE_INVALID_SAMPLE_DESC] Exception thrown at 0x00007FF8D7453B29 in spectrum.exe: Microsoft C++ exception: _com_error at memory location 0x0000004719CFBB40. D3D12 ERROR: ID3D12Device::CreateGraphicsPipelineState: Failed to determine format support for format 66 [ STATE_CREATION ERROR #676: CREATEGRAPHICSPIPELINESTATE_OM_RENDER_TARGET_DOES_NOT_SUPPORT_BLENDING] D3D12 ERROR: ID3D12Device::CreateGraphicsPipelineState: The specified sample count or quality is not supported with the render target format in slot 0 [ STATE_CREATION ERROR #685: CREATEGRAPHICSPIPELINESTATE_INVALID_SAMPLE_DESC] Exception thrown at 0x00007FF8D7453B29 in spectrum.exe: Microsoft C++ exception: _com_error at memory location 0x0000004719CFBA70. [ERROR] : 13320 The parameter is incorrect. at: auto __cdecl DX12::PipelineState::on_change::::operator ()(void) const
Exception thrown at 0x00007FF61D5E3FD2 in spectrum.exe: 0xC0000005: Access violation reading location 0x0000000000000000.