Fix particles on WebGPU to respect format support flags properly

This commit is contained in:
Wojtek Figat
2026-03-02 23:06:01 +01:00
parent 3b2015e816
commit 23ebb0e754
10 changed files with 171 additions and 72 deletions

View File

@@ -786,7 +786,10 @@ bool GPUDeviceDX12::Init()
if (FAILED(_device->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT, &formatInfo, sizeof(formatInfo))))
formatInfo.Support1 = D3D12_FORMAT_SUPPORT1_NONE;
const MSAALevel maximumMultisampleCount = GetMaximumMultisampleCount(_device, dxgiFormat);
FeaturesPerFormat[i] = FormatFeatures(maximumMultisampleCount, (FormatSupport)formatInfo.Support1);
FormatSupport support = (FormatSupport)formatInfo.Support1;
if (EnumHasAllFlags(support, FormatSupport::ShaderLoad))
support |= FormatSupport::UnorderedAccess;
FeaturesPerFormat[i] = FormatFeatures(maximumMultisampleCount, support);
}
D3D12_FEATURE_DATA_D3D12_OPTIONS2 options2 = {};