2017-04-20 13:26 GMT+02:00 Paul Gofman gofmanp@gmail.com:
-static BOOL param_set_dirty_flag_ptr(void *dirty_flag_ptr, struct d3dx_parameter *param) +static BOOL param_set_top_level_param(void *top_level_param, struct d3dx_parameter *param) {
- param->dirty_flag_ptr = (DWORD *)dirty_flag_ptr;
- param->top_level_param = (struct d3dx_parameter *)top_level_param; return FALSE;
}
The cast is unnecessary (yeah, it was already unnecessary, I missed that earlier).
It might make sense to store both? Avoiding the extra indirection in is_param_dirty() might help a tiny bit. It's fine to tackle this later on.
On 04/21/2017 08:04 PM, Matteo Bruni wrote:
It might make sense to store both? Avoiding the extra indirection in is_param_dirty() might help a tiny bit. It's fine to tackle this later on.
But this is not exactly an extra indirection, dirty flag is referenced by top_level_param, just offset is added compared to referencing flags exactly. Do you think getting rid of constant displacement to offset register costs more than cost effectively induced by having an extra pointer field?
2017-04-21 19:15 GMT+02:00 Paul Gofman gofmanp@gmail.com:
On 04/21/2017 08:04 PM, Matteo Bruni wrote:
It might make sense to store both? Avoiding the extra indirection in is_param_dirty() might help a tiny bit. It's fine to tackle this later on.
But this is not exactly an extra indirection, dirty flag is referenced by top_level_param, just offset is added compared to referencing flags exactly. Do you think getting rid of constant displacement to offset register costs more than cost effectively induced by having an extra pointer field?
No, you're right, it wouldn't make that much of a difference.