rsx: Minor optimization; avoid preparing unused vertex streams

- Also discards unused program state variables
This commit is contained in:
kd-11 2021-09-15 20:46:03 +03:00 committed by kd-11
parent e7b9513d4a
commit 3e09b97f58
11 changed files with 75 additions and 81 deletions

View file

@ -52,20 +52,18 @@ namespace rsx
masked_transfer(slots_, src, mask);
}
void fragment_program_texture_state::clear(u32 index)
{
const u16 clear_mask = ~(static_cast<u16>(1 << index));
unnormalized_coords &= clear_mask;
redirected_textures &= clear_mask;
shadow_textures &= clear_mask;
}
void fragment_program_texture_state::import(const fragment_program_texture_state& other, u16 mask)
{
unnormalized_coords = other.unnormalized_coords & mask;
redirected_textures = other.redirected_textures & mask;
shadow_textures = other.shadow_textures & mask;
texture_dimensions = other.texture_dimensions & duplicate_and_extend(mask);
void fragment_program_texture_state::clear(u32 index)
{
const u16 clear_mask = ~(static_cast<u16>(1 << index));
redirected_textures &= clear_mask;
shadow_textures &= clear_mask;
}
void fragment_program_texture_state::import(const fragment_program_texture_state& other, u16 mask)
{
redirected_textures = other.redirected_textures & mask;
shadow_textures = other.shadow_textures & mask;
texture_dimensions = other.texture_dimensions & duplicate_and_extend(mask);
}
void fragment_program_texture_state::set_dimension(texture_dimension_extended type, u32 index)
@ -77,14 +75,13 @@ namespace rsx
}
bool fragment_program_texture_state::operator == (const fragment_program_texture_state& other) const
{
return texture_dimensions == other.texture_dimensions &&
redirected_textures == other.redirected_textures &&
shadow_textures == other.shadow_textures &&
unnormalized_coords == other.unnormalized_coords;
}
void vertex_program_texture_state::clear(u32 /*index*/)
{
return texture_dimensions == other.texture_dimensions &&
redirected_textures == other.redirected_textures &&
shadow_textures == other.shadow_textures;
}
void vertex_program_texture_state::clear(u32 /*index*/)
{
// Nothing to do yet
}