mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
rsx: Minor optimization; avoid preparing unused vertex streams
- Also discards unused program state variables
This commit is contained in:
parent
e7b9513d4a
commit
3e09b97f58
11 changed files with 75 additions and 81 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue