[Vulkan]: Implement MirrorOnceBorder and MirrorOnceClampOGL
This commit is contained in:
parent
6f4f73a59b
commit
638957ef97
1 changed files with 12 additions and 1 deletions
|
|
@ -76,7 +76,18 @@ VkSamplerAddressMode WrapMode(const Device& device, Tegra::Texture::WrapMode wra
|
|||
case Tegra::Texture::WrapMode::MirrorOnceClampToEdge:
|
||||
return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
|
||||
case Tegra::Texture::WrapMode::MirrorOnceBorder:
|
||||
UNIMPLEMENTED();
|
||||
// GL_MIRROR_CLAMP_TO_BORDER
|
||||
if (device.GetDriverID() == VK_DRIVER_ID_NVIDIA_PROPRIETARY) {
|
||||
return static_cast<VkSamplerAddressMode>(0x8912); // GL_MIRROR_CLAMP_TO_BORDER_EXT
|
||||
}
|
||||
// Fallback
|
||||
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
|
||||
case Tegra::Texture::WrapMode::MirrorOnceClampOGL:
|
||||
// GL_MIRROR_CLAMP
|
||||
if (device.GetDriverID() == VK_DRIVER_ID_NVIDIA_PROPRIETARY) {
|
||||
return static_cast<VkSamplerAddressMode>(0x8742); // GL_MIRROR_CLAMP_EXT
|
||||
}
|
||||
// Fallback: MIRROR_CLAMP_TO_EDGE is the closest approximation
|
||||
return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Unimplemented wrap mode={}", wrap_mode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue