Flip S8D24 red and green channels, pass float border color rather than int
This commit is contained in:
parent
97f7a560f3
commit
0fa046e157
3 changed files with 8 additions and 2 deletions
|
@ -1064,7 +1064,7 @@ void RasterizerVulkan::UpdateDepthBoundsTestEnable(Tegra::Engines::Maxwell3D::Re
|
|||
LOG_WARNING(Render_Vulkan, "Depth bounds is enabled but not supported");
|
||||
enabled = false;
|
||||
}
|
||||
scheduler.Record([enable = regs.depth_bounds_enable](vk::CommandBuffer cmdbuf) {
|
||||
scheduler.Record([enable = enabled](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.SetDepthBoundsTestEnableEXT(enable);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1763,7 +1763,7 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& t
|
|||
.minLod = tsc.mipmap_filter == TextureMipmapFilter::None ? 0.0f : tsc.MinLod(),
|
||||
.maxLod = tsc.mipmap_filter == TextureMipmapFilter::None ? 0.25f : tsc.MaxLod(),
|
||||
.borderColor =
|
||||
arbitrary_borders ? VK_BORDER_COLOR_INT_CUSTOM_EXT : ConvertBorderColor(color),
|
||||
arbitrary_borders ? VK_BORDER_COLOR_FLOAT_CUSTOM_EXT : ConvertBorderColor(color),
|
||||
.unnormalizedCoordinates = VK_FALSE,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -74,6 +74,12 @@ ImageViewInfo::ImageViewInfo(const TICEntry& config, s32 base_layer) noexcept
|
|||
ASSERT_MSG(false, "Invalid texture_type={}", static_cast<int>(config.texture_type.Value()));
|
||||
break;
|
||||
}
|
||||
|
||||
// S8_UINT_D24_UNORM is not supported directly, and we use D24S8 instead.
|
||||
// To make sure shaders grab the right channels, swap R and G.
|
||||
if (format == PixelFormat::S8_UINT_D24_UNORM) {
|
||||
y_source = std::exchange(x_source, y_source);
|
||||
}
|
||||
}
|
||||
|
||||
ImageViewInfo::ImageViewInfo(ImageViewType type_, PixelFormat format_,
|
||||
|
|
Loading…
Add table
Reference in a new issue