rsx/prog: Use a proper cache hint key instead of disjointed counters

This commit is contained in:
kd-11 2025-03-08 19:03:05 +03:00 committed by kd-11
parent 26495a8455
commit a1c8f3a528
9 changed files with 110 additions and 101 deletions

View file

@ -1904,7 +1904,6 @@ namespace rsx
}
m_graphics_state.clear(rsx::pipeline_state::fragment_program_ucode_dirty);
fragment_program_invalidation_count++;
// Request for update of fragment constants if the program block is invalidated
m_graphics_state |= rsx::pipeline_state::fragment_constants_dirty;
@ -1954,7 +1953,6 @@ namespace rsx
}
m_graphics_state.clear(rsx::pipeline_state::vertex_program_ucode_dirty);
vertex_program_invalidation_count++;
// Reload transform constants unconditionally for now
m_graphics_state |= rsx::pipeline_state::transform_constants_dirty;
@ -1990,6 +1988,8 @@ namespace rsx
void thread::analyse_current_rsx_pipeline()
{
m_program_cache_hint.invalidate(m_graphics_state.load());
prefetch_vertex_program();
prefetch_fragment_program();
}
@ -2012,7 +2012,6 @@ namespace rsx
return;
}
vertex_program_invalidation_count++;
ensure(!m_graphics_state.test(rsx::pipeline_state::vertex_program_ucode_dirty));
current_vertex_program.output_mask = rsx::method_registers.vertex_attrib_output_mask();
@ -2048,9 +2047,6 @@ namespace rsx
m_graphics_state.clear(rsx::pipeline_state::fragment_program_dirty);
// FP config is always checked for now (see get_graphics_pipeline)
//fragment_program_invalidation_count++;
current_fragment_program.ctrl = m_ctx->register_state->shader_control() & (CELL_GCM_SHADER_CONTROL_32_BITS_EXPORTS | CELL_GCM_SHADER_CONTROL_DEPTH_EXPORT);
current_fragment_program.texcoord_control_mask = m_ctx->register_state->texcoord_control_mask();
current_fragment_program.two_sided_lighting = m_ctx->register_state->two_side_light_en();