diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index 07beecee33..51026cc88e 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -257,8 +257,8 @@ namespace rsx //zcull virtual void notify_zcull_info_changed() {} - virtual void clear_zcull_stats(u32 type) {} - virtual u32 get_zcull_stats(u32 type) { return UINT32_MAX; } + virtual void clear_zcull_stats(u32 /*type*/) {} + virtual u32 get_zcull_stats(u32 /*type*/) { return UINT32_MAX; } gsl::span get_raw_index_array(const std::vector >& draw_indexed_clause) const; gsl::span get_raw_vertex_buffer(const rsx::data_array_format_info&, u32 base_offset, const std::vector>& vertex_ranges) const; diff --git a/rpcs3/Emu/RSX/rsx_methods.h b/rpcs3/Emu/RSX/rsx_methods.h index d9684be642..4c54e5e4ff 100644 --- a/rpcs3/Emu/RSX/rsx_methods.h +++ b/rpcs3/Emu/RSX/rsx_methods.h @@ -376,12 +376,24 @@ namespace rsx f32 clip_min() const { - return decode().clip_min(); + f32 depth_min = decode().clip_min(); + + //Clamp to [0, 1] + if (depth_min < 0.f) return 0.f; + if (depth_min > 1.f) return 1.f; + + return depth_min; } f32 clip_max() const { - return decode().clip_max(); + f32 depth_max = decode().clip_max(); + + //Clamp to [0, 1] + if (depth_max < 0.f) return 0.f; + if (depth_max > 1.f) return 1.f; + + return depth_max; } bool logic_op_enabled() const