rsx: Invalidate transform block on program change

- Since each program now does a remap of the outputs, we need to reupload the constants
- This is not a loss, constants are almost always changing between draw calls anyway
This commit is contained in:
kd-11 2022-03-24 21:31:17 +03:00 committed by kd-11
parent 96742852eb
commit 1592ecdc55
3 changed files with 6 additions and 20 deletions

View File

@ -621,13 +621,6 @@ void GLGSRender::end()
if (m_graphics_state & (rsx::pipeline_state::fragment_program_ucode_dirty | rsx::pipeline_state::vertex_program_ucode_dirty))
{
// TODO: Move to shared code
if ((m_graphics_state & rsx::pipeline_state::vertex_program_ucode_dirty) &&
m_vertex_prog && !m_vertex_prog->has_indexed_constants)
{
m_graphics_state |= rsx::pipeline_state::transform_constants_dirty;
}
analyse_current_rsx_pipeline();
}

View File

@ -1649,6 +1649,9 @@ namespace rsx
m_graphics_state &= ~rsx::pipeline_state::fragment_program_ucode_dirty;
// Request for update of fragment constants if the program block is invalidated
m_graphics_state |= rsx::pipeline_state::fragment_constants_dirty;
const auto [program_offset, program_location] = method_registers.shader_program_address();
const auto prev_textures_reference_mask = current_fp_metadata.referenced_textures_mask;
@ -1693,6 +1696,9 @@ namespace rsx
m_graphics_state &= ~rsx::pipeline_state::vertex_program_ucode_dirty;
// Reload transform constants unconditionally for now
m_graphics_state |= rsx::pipeline_state::transform_constants_dirty;
const u32 transform_program_start = rsx::method_registers.transform_program_start();
current_vertex_program.data.reserve(512 * 4);
current_vertex_program.jump_table.clear();
@ -1724,12 +1730,6 @@ namespace rsx
void thread::analyse_current_rsx_pipeline()
{
if (m_graphics_state & rsx::pipeline_state::fragment_program_ucode_dirty)
{
// Request for update of fragment constants if the program block is invalidated
m_graphics_state |= rsx::pipeline_state::fragment_constants_dirty;
}
prefetch_vertex_program();
prefetch_fragment_program();
}

View File

@ -1030,13 +1030,6 @@ void VKGSRender::end()
if (m_graphics_state & (rsx::pipeline_state::fragment_program_ucode_dirty | rsx::pipeline_state::vertex_program_ucode_dirty))
{
// TODO: Move to shared code
if ((m_graphics_state & rsx::pipeline_state::vertex_program_ucode_dirty) &&
m_vertex_prog && !m_vertex_prog->has_indexed_constants)
{
m_graphics_state |= rsx::pipeline_state::transform_constants_dirty;
}
analyse_current_rsx_pipeline();
}