mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
rsx: Cache draw subranges storage
This commit is contained in:
parent
b2feff7d38
commit
f3f1a2bb5d
2 changed files with 7 additions and 3 deletions
|
@ -138,7 +138,7 @@ namespace rsx
|
|||
is_disjoint_primitive = is_primitive_disjointed(primitive);
|
||||
}
|
||||
|
||||
simple_array<draw_range_t> draw_clause::get_subranges() const
|
||||
const simple_array<draw_range_t>& draw_clause::get_subranges() const
|
||||
{
|
||||
ensure(!is_single_draw());
|
||||
|
||||
|
@ -146,7 +146,8 @@ namespace rsx
|
|||
const auto limit = range.first + range.count;
|
||||
const auto _pass_count = pass_count();
|
||||
|
||||
simple_array<draw_range_t> ret;
|
||||
auto &ret = subranges_store;
|
||||
ret.clear();
|
||||
ret.reserve(_pass_count);
|
||||
|
||||
u32 previous_barrier = range.first;
|
||||
|
|
|
@ -35,6 +35,9 @@ namespace rsx
|
|||
// Draw-time iterator to the draw_command_barriers struct
|
||||
mutable simple_array<barrier_t>::iterator current_barrier_it;
|
||||
|
||||
// Subranges memory cache
|
||||
mutable rsx::simple_array<draw_range_t> subranges_store;
|
||||
|
||||
// Helper functions
|
||||
// Add a new draw command
|
||||
void append_draw_command(const draw_range_t& range)
|
||||
|
@ -298,6 +301,6 @@ namespace rsx
|
|||
* Returns a compiled list of all subdraws.
|
||||
* NOTE: This is a non-trivial operation as it takes disjoint primitive boundaries into account.
|
||||
*/
|
||||
simple_array<draw_range_t> get_subranges() const;
|
||||
const simple_array<draw_range_t>& get_subranges() const;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue