diff --git a/lib/gfx/depth_peek.cpp b/lib/gfx/depth_peek.cpp index 3fe72cb..ab50d64 100644 --- a/lib/gfx/depth_peek.cpp +++ b/lib/gfx/depth_peek.cpp @@ -306,7 +306,7 @@ void complete_slot(size_t slotIdx, wgpu::MapAsyncStatus status, wgpu::StringView } // namespace void initialize() { - if (!webgpu::g_hasCoreCompatibility) { + if (!webgpu::g_hasCoreFeatures) { return; } g_bindGroupLayout = create_bind_group_layout("Depth Peek Bind Group Layout"); diff --git a/lib/gfx/tex_copy_conv.cpp b/lib/gfx/tex_copy_conv.cpp index bf7c67c..ca1a87a 100644 --- a/lib/gfx/tex_copy_conv.cpp +++ b/lib/gfx/tex_copy_conv.cpp @@ -401,7 +401,7 @@ void initialize() { } } // Skip depth copies in compatibility mode - if (webgpu::g_hasCoreCompatibility) { + if (webgpu::g_hasCoreFeatures) { for (const auto& conv : DepthConvPipelines) { g_pipelines[conv.fmt] = create_pipeline(conv, DepthShaderPreamble, g_depthBindGroupLayout); if (conv.outputFormat != to_wgpu(conv.fmt)) { @@ -441,7 +441,7 @@ static void execute(const wgpu::CommandEncoder& cmd, const ConvRequest& req, con wgpu::BindGroup bindGroup; if (gx::is_depth_format(req.fmt)) { // Skip depth copies in compatibility mode - if (!webgpu::g_hasCoreCompatibility) { + if (!webgpu::g_hasCoreFeatures) { return; } const std::array bindGroupEntries{ diff --git a/lib/gx/gx.cpp b/lib/gx/gx.cpp index 5aa1467..1cf3ecf 100644 --- a/lib/gx/gx.cpp +++ b/lib/gx/gx.cpp @@ -635,7 +635,7 @@ wgpu::RenderPipeline build_pipeline(const PipelineConfig& config, ArrayRef(config.polygonOffsetBits); const float depthBiasSlopeScale = (UseReversedZ ? -1.0f : 1.0f) * std::bit_cast(config.polygonOffsetScaleBits); - const float depthBiasClamp = webgpu::g_hasCoreCompatibility + const float depthBiasClamp = webgpu::g_hasCoreFeatures ? std::bit_cast(config.polygonOffsetClampBits) : 0.0f; const wgpu::DepthStencilState depthStencil{ diff --git a/lib/webgpu/gpu.cpp b/lib/webgpu/gpu.cpp index bc50440..37fb564 100644 --- a/lib/webgpu/gpu.cpp +++ b/lib/webgpu/gpu.cpp @@ -60,7 +60,7 @@ static wgpu::Adapter g_adapter; wgpu::Instance g_instance; wgpu::AdapterInfo g_adapterInfo; static wgpu::SurfaceCapabilities g_surfaceCapabilities; -bool g_hasCoreCompatibility = false; +bool g_hasCoreFeatures = false; bool g_bcTexturesSupported = false; bool g_astcTexturesSupported = false; bool g_textureComponentSwizzleSupported = false; @@ -889,7 +889,7 @@ bool initialize(AuroraBackend auroraBackend, bool allowCpu) { requiredLimits.maxStorageBuffersPerShaderStage, requiredLimits.minUniformBufferOffsetAlignment, requiredLimits.minStorageBufferOffsetAlignment); std::vector requiredFeatures; - g_hasCoreCompatibility = false; + g_hasCoreFeatures = false; g_bcTexturesSupported = false; g_astcTexturesSupported = false; g_textureComponentSwizzleSupported = false; @@ -901,7 +901,7 @@ bool initialize(AuroraBackend auroraBackend, bool allowCpu) { feature == wgpu::FeatureName::TextureCompressionASTC || feature == wgpu::FeatureName::TextureComponentSwizzle) { if (feature == wgpu::FeatureName::CoreFeaturesAndLimits) { - g_hasCoreCompatibility = true; + g_hasCoreFeatures = true; } else if (feature == wgpu::FeatureName::TextureCompressionBC) { g_bcTexturesSupported = true; } else if (feature == wgpu::FeatureName::TextureCompressionASTC) { diff --git a/lib/webgpu/gpu.hpp b/lib/webgpu/gpu.hpp index 78146e9..3943da0 100644 --- a/lib/webgpu/gpu.hpp +++ b/lib/webgpu/gpu.hpp @@ -52,7 +52,7 @@ extern wgpu::RenderPipeline g_CopyPremultipliedAlphaPipeline; extern wgpu::BindGroup g_CopyBindGroup; extern wgpu::Instance g_instance; extern wgpu::AdapterInfo g_adapterInfo; -extern bool g_hasCoreCompatibility; +extern bool g_hasCoreFeatures; extern bool g_bcTexturesSupported; extern bool g_astcTexturesSupported; extern bool g_textureComponentSwizzleSupported;