Skip to content

Commit

Permalink
Merge branch 'shadps4-emu:main' into Full-BB
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolix29 authored Oct 5, 2024
2 parents e245ea7 + 5bb45dc commit 755ffed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/video_core/renderer_vulkan/vk_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ class Instance {
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;
Expand Down
2 changes: 1 addition & 1 deletion src/video_core/texture_cache/sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 755ffed

Please sign in to comment.