mirror of
https://github.com/encounter/aurora.git
synced 2026-07-09 18:19:33 -07:00
Small rename
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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{
|
||||
|
||||
+1
-1
@@ -635,7 +635,7 @@ wgpu::RenderPipeline build_pipeline(const PipelineConfig& config, ArrayRef<wgpu:
|
||||
ZoneScoped;
|
||||
const float depthBias = (UseReversedZ ? -1.0f : 1.0f) * std::bit_cast<float>(config.polygonOffsetBits);
|
||||
const float depthBiasSlopeScale = (UseReversedZ ? -1.0f : 1.0f) * std::bit_cast<float>(config.polygonOffsetScaleBits);
|
||||
const float depthBiasClamp = webgpu::g_hasCoreCompatibility
|
||||
const float depthBiasClamp = webgpu::g_hasCoreFeatures
|
||||
? std::bit_cast<float>(config.polygonOffsetClampBits)
|
||||
: 0.0f;
|
||||
const wgpu::DepthStencilState depthStencil{
|
||||
|
||||
+3
-3
@@ -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<wgpu::FeatureName> 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) {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user