Fix compilation warnings from a925c7410a

This commit is contained in:
Wojtek Figat
2026-03-03 10:25:57 +01:00
parent 3e63551e90
commit 9df5da2a88
3 changed files with 9 additions and 5 deletions

View File

@@ -605,11 +605,13 @@ bool GPUDeviceDX11::Init()
limits.HasVolumeTextureRendering = true;
limits.HasDrawIndirect = true;
limits.HasAppendConsumeBuffers = true;
limits.HasSeparateRenderTargetBlendState = true;
limits.HasDepthAsSRV = true;
limits.HasDepthClip = true;
limits.HasReadOnlyDepth = true;
PRAGMA_DISABLE_DEPRECATION_WARNINGS
limits.HasSeparateRenderTargetBlendState = true;
limits.HasMultisampleDepthAsSRV = true;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
limits.HasTypedUAVLoad = featureDataD3D11Options2.TypedUAVLoadAdditionalFormats != 0;
limits.MaximumMipLevelsCount = D3D11_REQ_MIP_LEVELS;
limits.MaximumTexture1DSize = D3D11_REQ_TEXTURE1D_U_DIMENSION;
@@ -629,11 +631,9 @@ bool GPUDeviceDX11::Init()
limits.HasVolumeTextureRendering = false;
limits.HasDrawIndirect = false;
limits.HasAppendConsumeBuffers = false;
limits.HasSeparateRenderTargetBlendState = false;
limits.HasDepthAsSRV = false;
limits.HasDepthClip = true;
limits.HasReadOnlyDepth = createdFeatureLevel == D3D_FEATURE_LEVEL_10_1;
limits.HasMultisampleDepthAsSRV = false;
limits.HasTypedUAVLoad = false;
limits.MaximumMipLevelsCount = D3D10_REQ_MIP_LEVELS;
limits.MaximumTexture1DSize = D3D10_REQ_TEXTURE1D_U_DIMENSION;

View File

@@ -763,11 +763,13 @@ bool GPUDeviceDX12::Init()
limits.HasVolumeTextureRendering = true;
limits.HasDrawIndirect = true;
limits.HasAppendConsumeBuffers = true;
limits.HasSeparateRenderTargetBlendState = true;
limits.HasDepthAsSRV = true;
limits.HasDepthClip = true;
limits.HasReadOnlyDepth = true;
PRAGMA_DISABLE_DEPRECATION_WARNINGS
limits.HasMultisampleDepthAsSRV = true;
limits.HasSeparateRenderTargetBlendState = true;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
limits.HasTypedUAVLoad = options.TypedUAVLoadAdditionalFormats != 0;
limits.MaximumMipLevelsCount = D3D12_REQ_MIP_LEVELS;
limits.MaximumTexture1DSize = D3D12_REQ_TEXTURE1D_U_DIMENSION;

View File

@@ -1730,12 +1730,14 @@ bool GPUDeviceVulkan::Init()
limits.HasVolumeTextureRendering = true;
limits.HasDrawIndirect = PhysicalDeviceLimits.maxDrawIndirectCount >= 1;
limits.HasAppendConsumeBuffers = false; // TODO: add Append Consume buffers support for Vulkan
limits.HasSeparateRenderTargetBlendState = true;
limits.HasDepthClip = PhysicalDeviceFeatures.depthClamp;
limits.HasDepthBounds = PhysicalDeviceFeatures.depthBounds;
limits.HasDepthAsSRV = true;
limits.HasReadOnlyDepth = true;
PRAGMA_DISABLE_DEPRECATION_WARNINGS
limits.HasSeparateRenderTargetBlendState = true;
limits.HasMultisampleDepthAsSRV = !!PhysicalDeviceFeatures.sampleRateShading;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
limits.HasTypedUAVLoad = true;
limits.MaximumMipLevelsCount = Math::Min(static_cast<int32>(log2(PhysicalDeviceLimits.maxImageDimension2D)), GPU_MAX_TEXTURE_MIP_LEVELS);
limits.MaximumTexture1DSize = PhysicalDeviceLimits.maxImageDimension1D;