mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
rsx: Fix depth clipping
- Fix special case where n=f making (f-n) = 0 - Dynamically update depth range by setting dirty bits - Fix depth bounds when n=f and bounds test is disabled
This commit is contained in:
parent
dc465df3bc
commit
6380e67af9
6 changed files with 60 additions and 33 deletions
|
@ -887,18 +887,6 @@ namespace rsx
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<u32 index>
|
||||
struct set_viewport_dirty_bit
|
||||
{
|
||||
static void impl(thread* rsx, u32 _reg, u32 arg)
|
||||
{
|
||||
if (arg != method_registers.register_previous_value)
|
||||
{
|
||||
rsx->m_graphics_state |= rsx::pipeline_state::vertex_state_dirty;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
namespace nv308a
|
||||
|
@ -3169,8 +3157,8 @@ namespace rsx
|
|||
bind<NV4097_SET_VERTEX_DATA_BASE_INDEX, nv4097::set_index_base_offset>();
|
||||
bind<NV4097_SET_USER_CLIP_PLANE_CONTROL, nv4097::notify_state_changed<vertex_state_dirty>>();
|
||||
bind<NV4097_SET_TRANSFORM_BRANCH_BITS, nv4097::notify_state_changed<vertex_state_dirty>>();
|
||||
bind<NV4097_SET_CLIP_MIN, nv4097::notify_state_changed<vertex_state_dirty>>();
|
||||
bind<NV4097_SET_CLIP_MAX, nv4097::notify_state_changed<vertex_state_dirty>>();
|
||||
bind<NV4097_SET_CLIP_MIN, nv4097::notify_state_changed<invalidate_zclip_bits>>();
|
||||
bind<NV4097_SET_CLIP_MAX, nv4097::notify_state_changed<invalidate_zclip_bits>>();
|
||||
bind<NV4097_SET_POINT_SIZE, nv4097::notify_state_changed<vertex_state_dirty>>();
|
||||
bind<NV4097_SET_ALPHA_FUNC, nv4097::notify_state_changed<fragment_state_dirty>>();
|
||||
bind<NV4097_SET_ALPHA_REF, nv4097::notify_state_changed<fragment_state_dirty>>();
|
||||
|
@ -3184,8 +3172,8 @@ namespace rsx
|
|||
bind<NV4097_SET_VIEWPORT_HORIZONTAL, nv4097::notify_state_changed<scissor_config_state_dirty>>();
|
||||
bind<NV4097_SET_VIEWPORT_VERTICAL, nv4097::notify_state_changed<scissor_config_state_dirty>>();
|
||||
bind_array<NV4097_SET_FOG_PARAMS, 1, 2, nv4097::notify_state_changed<fragment_state_dirty>>();
|
||||
bind_range<NV4097_SET_VIEWPORT_SCALE, 1, 3, nv4097::set_viewport_dirty_bit>();
|
||||
bind_range<NV4097_SET_VIEWPORT_OFFSET, 1, 3, nv4097::set_viewport_dirty_bit>();
|
||||
bind_array<NV4097_SET_VIEWPORT_SCALE, 1, 3, nv4097::notify_state_changed<vertex_state_dirty>>();
|
||||
bind_array<NV4097_SET_VIEWPORT_OFFSET, 1, 3, nv4097::notify_state_changed<vertex_state_dirty>>();
|
||||
bind<NV4097_SET_INDEX_ARRAY_DMA, nv4097::check_index_array_dma>();
|
||||
bind<NV4097_SET_BLEND_EQUATION, nv4097::set_blend_equation>();
|
||||
bind<NV4097_SET_BLEND_FUNC_SFACTOR, nv4097::set_blend_factor>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue