-
Notifications
You must be signed in to change notification settings - Fork 280
Description
I'm following the guide for SSSR here: https://gpuopen.com/manuals/fidelityfx_sdk/techniques/stochastic-screen-space-reflections/, and when I call ffxSssrContextCreate, I get a D3D12 error:
D3D12 ERROR: ID3D12Device::CreateComputePipelineState: A valid compute shader must be specified. [ STATE_CREATION ERROR #881: CREATECOMPUTEPIPELINESTATE_INVALID_SHADER]
My GPU supports SM6.6 (I use it for everything else), so I should meet the requirements on the page. Does anything else need to be done to allow it to create shaders properly?
I'm using the precompiled binaries from the v1.1.4 release, and my setup code looks like this:
'''
auto outputRes = m_getOutputRes();
auto renderRes = m_getRenderRes();
auto device = ffxGetDeviceDX12(DeviceManager::GetInstance().GetDevice().Get());
auto scratchMemorySize = ffxGetScratchMemorySizeDX12(10);
// Why can't FFX allocate this itself?
m_pScratchMemory = malloc(scratchMemorySize);
if (!m_pScratchMemory) {
spdlog::error("Failed to allocate scratch memory for FFX SSRR");
return false;
}
memset(m_pScratchMemory, 0, scratchMemorySize);
ffxGetInterfaceDX12(&m_backendInterface, device, m_pScratchMemory, scratchMemorySize, 1);
FfxSssrContextDescription sssrDesc{};
sssrDesc.backendInterface = m_backendInterface;
sssrDesc.normalsHistoryBufferFormat = FFX_SURFACE_FORMAT_R32G32B32A32_TYPELESS;
sssrDesc.renderSize = { renderRes.x, renderRes.y };
ffxSssrContextCreate(&m_sssrContext, &sssrDesc);
'''
I loaded the debug dll & pdb, and it looks like the error is occurring on this FFX_VALIDATE call:
wcscpy_s(pipelineDescription.name, L"SSSR-DEPTH_DOWNSAMPLE");
FFX_VALIDATE(context->contextDescription.backendInterface.fpCreatePipeline(&context->contextDescription.backendInterface, FFX_EFFECT_SSSR, FFX_SSSR_PASS_DEPTH_DOWNSAMPLE,
getPipelinePermutationFlags(contextFlags, FFX_SSSR_PASS_DEPTH_DOWNSAMPLE, supportedFP16, false), &pipelineDescription, context->effectContextId, &context->pipelineDepthDownsample ));
I then loaded the debug DX12 backend DLL- and the error no longer occurs, making it hard to debug. It seems to happen somewhere within fpCreatePipeline, but not when the debug build is loaded.
Any ideas what could be causing this?
Thanks!