mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
vulkan: Use closest available equivalent to missing clamp modes.
This commit is contained in:
parent
4fe81231f6
commit
1f59e3663c
2 changed files with 10 additions and 0 deletions
|
@ -199,8 +199,17 @@ vk::SamplerAddressMode ClampMode(AmdGpu::ClampMode mode) {
|
|||
return vk::SamplerAddressMode::eMirroredRepeat;
|
||||
case AmdGpu::ClampMode::ClampLastTexel:
|
||||
return vk::SamplerAddressMode::eClampToEdge;
|
||||
case AmdGpu::ClampMode::MirrorOnceHalfBorder:
|
||||
case AmdGpu::ClampMode::MirrorOnceBorder:
|
||||
LOG_WARNING(Render_Vulkan, "Unimplemented clamp mode {}, using closest equivalent.",
|
||||
static_cast<u32>(mode));
|
||||
[[fallthrough]];
|
||||
case AmdGpu::ClampMode::MirrorOnceLastTexel:
|
||||
return vk::SamplerAddressMode::eMirrorClampToEdge;
|
||||
case AmdGpu::ClampMode::ClampHalfBorder:
|
||||
LOG_WARNING(Render_Vulkan, "Unimplemented clamp mode {}, using closest equivalent.",
|
||||
static_cast<u32>(mode));
|
||||
[[fallthrough]];
|
||||
case AmdGpu::ClampMode::ClampBorder:
|
||||
return vk::SamplerAddressMode::eClampToBorder;
|
||||
default:
|
||||
|
|
|
@ -309,6 +309,7 @@ bool Instance::CreateDevice() {
|
|||
.separateDepthStencilLayouts = vk12_features.separateDepthStencilLayouts,
|
||||
.hostQueryReset = vk12_features.hostQueryReset,
|
||||
.timelineSemaphore = vk12_features.timelineSemaphore,
|
||||
.samplerMirrorClampToEdge = vk12_features.samplerMirrorClampToEdge,
|
||||
},
|
||||
vk::PhysicalDeviceMaintenance4FeaturesKHR{
|
||||
.maintenance4 = true,
|
||||
|
|
Loading…
Add table
Reference in a new issue