diff --git a/src/util/d3d11_texture.cpp b/src/util/d3d11_texture.cpp index eca2705bd..f6ec3f63b 100644 --- a/src/util/d3d11_texture.cpp +++ b/src/util/d3d11_texture.cpp @@ -177,6 +177,7 @@ std::unique_ptr D3D11Device::CreateSampler(const GPUSampler::Config& D3D11_TEXTURE_ADDRESS_WRAP, // Repeat D3D11_TEXTURE_ADDRESS_CLAMP, // ClampToEdge D3D11_TEXTURE_ADDRESS_BORDER, // ClampToBorder + D3D11_TEXTURE_ADDRESS_MIRROR, // MirrorRepeat }}; static constexpr u8 filter_count = static_cast(GPUSampler::Filter::MaxCount); static constexpr D3D11_FILTER filters[filter_count][filter_count][filter_count] = { diff --git a/src/util/d3d12_texture.cpp b/src/util/d3d12_texture.cpp index 19d21c116..59310e7a8 100644 --- a/src/util/d3d12_texture.cpp +++ b/src/util/d3d12_texture.cpp @@ -786,6 +786,7 @@ D3D12DescriptorHandle D3D12Device::GetSampler(const GPUSampler::Config& config) D3D12_TEXTURE_ADDRESS_MODE_WRAP, // Repeat D3D12_TEXTURE_ADDRESS_MODE_CLAMP, // ClampToEdge D3D12_TEXTURE_ADDRESS_MODE_BORDER, // ClampToBorder + D3D12_TEXTURE_ADDRESS_MODE_MIRROR, // MirrorRepeat }}; static constexpr u8 filter_count = static_cast(GPUSampler::Filter::MaxCount); diff --git a/src/util/gpu_device.h b/src/util/gpu_device.h index 6ff361912..6f856bb68 100644 --- a/src/util/gpu_device.h +++ b/src/util/gpu_device.h @@ -69,6 +69,7 @@ public: Repeat, ClampToEdge, ClampToBorder, + MirrorRepeat, MaxCount }; diff --git a/src/util/metal_device.mm b/src/util/metal_device.mm index 46e36ec14..824581c07 100644 --- a/src/util/metal_device.mm +++ b/src/util/metal_device.mm @@ -1231,6 +1231,7 @@ std::unique_ptr MetalDevice::CreateSampler(const GPUSampler::Config& MTLSamplerAddressModeRepeat, // Repeat MTLSamplerAddressModeClampToEdge, // ClampToEdge MTLSamplerAddressModeClampToBorderColor, // ClampToBorder + MTLSamplerAddressModeMirrorRepeat, // MirrorRepeat }}; static constexpr std::array(GPUSampler::Filter::MaxCount)> min_mag_filters = {{ diff --git a/src/util/opengl_texture.cpp b/src/util/opengl_texture.cpp index 452c10f99..898aa160a 100644 --- a/src/util/opengl_texture.cpp +++ b/src/util/opengl_texture.cpp @@ -363,6 +363,7 @@ std::unique_ptr OpenGLDevice::CreateSampler(const GPUSampler::Config GL_REPEAT, // Repeat GL_CLAMP_TO_EDGE, // ClampToEdge GL_CLAMP_TO_BORDER, // ClampToBorder + GL_MIRRORED_REPEAT, // MirrorRepeat }}; // [mipmap_on_off][mipmap][filter] diff --git a/src/util/postprocessing_shader_fx.cpp b/src/util/postprocessing_shader_fx.cpp index ed6e893f7..2d44b2736 100644 --- a/src/util/postprocessing_shader_fx.cpp +++ b/src/util/postprocessing_shader_fx.cpp @@ -182,7 +182,7 @@ static GPUSampler::Config MapSampler(const reshadefx::sampler_info& si) case reshadefx::texture_address_mode::wrap: return GPUSampler::AddressMode::Repeat; case reshadefx::texture_address_mode::mirror: - Panic("Not implemented"); + return GPUSampler::AddressMode::MirrorRepeat; case reshadefx::texture_address_mode::clamp: return GPUSampler::AddressMode::ClampToEdge; case reshadefx::texture_address_mode::border: diff --git a/src/util/vulkan_texture.cpp b/src/util/vulkan_texture.cpp index 9f3863770..e447bc68d 100644 --- a/src/util/vulkan_texture.cpp +++ b/src/util/vulkan_texture.cpp @@ -870,6 +870,7 @@ VkSampler VulkanDevice::GetSampler(const GPUSampler::Config& config) VK_SAMPLER_ADDRESS_MODE_REPEAT, // Repeat VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, // ClampToEdge VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, // ClampToBorder + VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT, // MirrorRepeat }}; static constexpr std::array(GPUSampler::Filter::MaxCount)> min_mag_filters = {{ VK_FILTER_NEAREST, // Nearest