diff --git a/rpcs3/Emu/RSX/Core/RSXDriverState.h b/rpcs3/Emu/RSX/Core/RSXDriverState.h index e915cd67e2..16dd08c78d 100644 --- a/rpcs3/Emu/RSX/Core/RSXDriverState.h +++ b/rpcs3/Emu/RSX/Core/RSXDriverState.h @@ -40,6 +40,10 @@ namespace rsx xform_instancing_state_dirty = (1 << 25), // Transform instancing state has changed + // TODO - Should signal that we simply need to do a FP compare before the next draw call and invalidate the ucode if the content has changed. + // Marking as dirty to invalidate hot cache also works, it's not like there's tons of barriers per frame anyway. + fragment_program_needs_rehash = fragment_program_ucode_dirty, + fragment_program_dirty = fragment_program_ucode_dirty | fragment_program_state_dirty, vertex_program_dirty = vertex_program_ucode_dirty | vertex_program_state_dirty, invalidate_pipeline_bits = fragment_program_dirty | vertex_program_dirty | xform_instancing_state_dirty, diff --git a/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp b/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp index 242b1bdb73..92e3b1af53 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv406e.cpp @@ -26,7 +26,7 @@ namespace rsx const u32 addr = get_address(REGS(ctx)->semaphore_offset_406e(), REGS(ctx)->semaphore_context_dma_406e()); // Syncronization point, may be associated with memory changes without actually changing addresses - RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_program_ucode_dirty; + RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_program_needs_rehash; const auto& sema = vm::_ref(addr).val; diff --git a/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp b/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp index 77a1a10b11..1ab5371d9a 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv47_sync.hpp @@ -41,12 +41,12 @@ namespace rsx if constexpr (FlushPipe) { + // Syncronization point, may be associated with memory changes without actually changing addresses + RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_program_needs_rehash; + // Manually flush the pipeline. // It is possible to stream report writes using the host GPU, but that generates too much submit traffic. RSX(ctx)->sync(); - - // Syncronization point, may be associated with memory changes without actually changing addresses - RSX(ctx)->m_graphics_state |= rsx::pipeline_state::fragment_program_ucode_dirty; } }