mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
vulkan: Respect maximum sampler LOD bias. (#1254)
This commit is contained in:
parent
8576d5e72c
commit
5bb45dc7ba
|
@ -222,6 +222,11 @@ public:
|
|||
return properties.limits.maxTexelBufferElements;
|
||||
}
|
||||
|
||||
/// Returns the maximum sampler LOD bias.
|
||||
float MaxSamplerLodBias() const {
|
||||
return properties.limits.maxSamplerLodBias;
|
||||
}
|
||||
|
||||
/// Returns the maximum number of push descriptors.
|
||||
u32 MaxPushDescriptors() const {
|
||||
return push_descriptor_props.maxPushDescriptors;
|
||||
|
|
|
@ -16,7 +16,7 @@ Sampler::Sampler(const Vulkan::Instance& instance, const AmdGpu::Sampler& sample
|
|||
.addressModeU = LiverpoolToVK::ClampMode(sampler.clamp_x),
|
||||
.addressModeV = LiverpoolToVK::ClampMode(sampler.clamp_y),
|
||||
.addressModeW = LiverpoolToVK::ClampMode(sampler.clamp_z),
|
||||
.mipLodBias = sampler.LodBias(),
|
||||
.mipLodBias = std::min(sampler.LodBias(), instance.MaxSamplerLodBias()),
|
||||
.compareEnable = sampler.depth_compare_func != AmdGpu::DepthCompare::Never,
|
||||
.compareOp = LiverpoolToVK::DepthCompare(sampler.depth_compare_func),
|
||||
.minLod = sampler.MinLod(),
|
||||
|
|
Loading…
Reference in a new issue