File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -138,15 +138,16 @@ namespace rsx
138
138
is_disjoint_primitive = is_primitive_disjointed (primitive);
139
139
}
140
140
141
- simple_array<draw_range_t > draw_clause::get_subranges () const
141
+ const simple_array<draw_range_t >& draw_clause::get_subranges () const
142
142
{
143
143
ensure (!is_single_draw ());
144
144
145
145
const auto range = get_range ();
146
146
const auto limit = range.first + range.count ;
147
147
const auto _pass_count = pass_count ();
148
148
149
- simple_array<draw_range_t > ret;
149
+ auto &ret = subranges_store;
150
+ ret.clear ();
150
151
ret.reserve (_pass_count);
151
152
152
153
u32 previous_barrier = range.first ;
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ namespace rsx
35
35
// Draw-time iterator to the draw_command_barriers struct
36
36
mutable simple_array<barrier_t >::iterator current_barrier_it;
37
37
38
+ // Subranges memory cache
39
+ mutable rsx::simple_array<draw_range_t > subranges_store;
40
+
38
41
// Helper functions
39
42
// Add a new draw command
40
43
void append_draw_command (const draw_range_t & range)
@@ -298,6 +301,6 @@ namespace rsx
298
301
* Returns a compiled list of all subdraws.
299
302
* NOTE: This is a non-trivial operation as it takes disjoint primitive boundaries into account.
300
303
*/
301
- simple_array<draw_range_t > get_subranges () const ;
304
+ const simple_array<draw_range_t >& get_subranges () const ;
302
305
};
303
306
}
You can’t perform that action at this time.
0 commit comments