[TEST] Add ifdef for required bit

This commit is contained in:
CamilleLaVey 2026-04-25 16:13:23 -04:00 committed by lizzie
parent 06fb00af94
commit a906f6e72b
3 changed files with 7 additions and 4 deletions

View file

@ -205,11 +205,14 @@ inline void PushImageDescriptors(TextureCache& texture_cache,
const auto& device = texture_cache.runtime.device; const auto& device = texture_cache.runtime.device;
const auto fmt_info = MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, true, const auto fmt_info = MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, true,
image_view.format); image_view.format);
#ifdef VK_FORMAT_FEATURE_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT
if (!device.IsFormatSupported(fmt_info.format, if (!device.IsFormatSupported(fmt_info.format,
VK_FORMAT_FEATURE_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT,
FormatType::Optimal)) { FormatType::Optimal)) {
need_no_compare = true; need_no_compare = true;
} }
#else
#endif
} }
VkSampler vk_sampler; VkSampler vk_sampler;

View file

@ -2400,8 +2400,7 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& t
if (compare_enable) { if (compare_enable) {
sampler_no_compare = create_sampler(max_anisotropy, false); sampler_no_compare = create_sampler(max_anisotropy, false);
} else { } else {
sampler_no_compare = sampler;
}
const f32 max_anisotropy_default = static_cast<f32>(1U << tsc.max_anisotropy); const f32 max_anisotropy_default = static_cast<f32>(1U << tsc.max_anisotropy);
if (max_anisotropy > max_anisotropy_default) { if (max_anisotropy > max_anisotropy_default) {
@ -2409,8 +2408,7 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& t
if (compare_enable) { if (compare_enable) {
sampler_no_compare_default_anisotropy = create_sampler(max_anisotropy_default, false); sampler_no_compare_default_anisotropy = create_sampler(max_anisotropy_default, false);
} else { } else {
sampler_no_compare_default_anisotropy = sampler_default_anisotropy;
}
} }
} }

View file

@ -449,7 +449,9 @@ private:
void QueueAsyncUnswizzle(Image& image, ImageId image_id); void QueueAsyncUnswizzle(Image& image, ImageId image_id);
void TickAsyncUnswizzle(); void TickAsyncUnswizzle();
public:
Runtime& runtime; Runtime& runtime;
private:
Tegra::MaxwellDeviceMemoryManager& device_memory; Tegra::MaxwellDeviceMemoryManager& device_memory;
std::deque<TextureCacheGPUMap> gpu_page_table_storage; std::deque<TextureCacheGPUMap> gpu_page_table_storage;