On Thu, Nov 14, 2019 at 3:45 PM Paul Gofman gofmanp@gmail.com wrote:
+static void *parameter_get_update_data(struct d3dx_effect *effect, struct d3dx_parameter *param,
unsigned int bytes, BOOL value_changed)
+{
- assert(bytes <= param->bytes);
- if (value_changed && !effect->current_parameter_block)
set_dirty(param);
- return effect->current_parameter_block ? record_parameter(effect, param, bytes) : param->data;
+}
I'm not entirely satisfied with this function (or possibly just its name). What's a bit annoying is that this sometimes it has a side effect (setting the parameter dirty), which is something one wouldn't normally expect from a "get". I don't think I have good suggestions though. It does have a vague resemblance to the texture_bind_and_dirtify() function in wined3d, so maybe simply call it param_get_and_flag_data() or something like that?