From 0dd543354ddeed05e48db97b07c78a1806cea499 Mon Sep 17 00:00:00 2001 From: kuba Date: Fri, 31 Jul 2026 11:11:53 +0200 Subject: [PATCH] Vulkan: enable textureCompressionBC when the device supports it (#716) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guest BC1–BC7 textures can be sampled directly when the feature is available; warn when it is not. --- src/SharpEmu.Libs/VideoOut/VulkanVideoPresenter.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SharpEmu.Libs/VideoOut/VulkanVideoPresenter.cs b/src/SharpEmu.Libs/VideoOut/VulkanVideoPresenter.cs index af8032d0..654970cf 100644 --- a/src/SharpEmu.Libs/VideoOut/VulkanVideoPresenter.cs +++ b/src/SharpEmu.Libs/VideoOut/VulkanVideoPresenter.cs @@ -4131,6 +4131,7 @@ internal static unsafe class VulkanVideoPresenter ShaderStorageImageExtendedFormats = supportedFeatures.ShaderStorageImageExtendedFormats, ShaderStorageImageReadWithoutFormat = supportedFeatures.ShaderStorageImageReadWithoutFormat, ShaderStorageImageWriteWithoutFormat = supportedFeatures.ShaderStorageImageWriteWithoutFormat, + TextureCompressionBC = supportedFeatures.TextureCompressionBC, RobustBufferAccess = supportedFeatures.RobustBufferAccess, }; @@ -4170,6 +4171,13 @@ internal static unsafe class VulkanVideoPresenter "translated shaders using unformatted storage image load/store will fail."); } + if (!supportedFeatures.TextureCompressionBC) + { + Console.Error.WriteLine( + "[LOADER][WARN] GPU does not support textureCompressionBC " + + "guest BC1-BC7 textures cannot be sampled directly."); + } + var maintenance8Features = new PhysicalDeviceMaintenance8FeaturesKHR { SType = StructureType.PhysicalDeviceMaintenance8FeaturesKhr,