On Mon Jul 28 20:11:30 2025 +0000, Matteo Bruni wrote:
This is a bit confusing since `struct d3dx_buffer` is doing two things at the same time: - offer functions to create and destroy a version-specific d3dx buffer - hold data for a specific instance of the version-specific d3dx buffer This won't be much of a problem for now, given the use cases we expect, and it could be improved somewhat with naming tweaks, but I think it would be better if we simply split up the two uses of the struct right away. What about this: - rename `struct d3dx_buffer_ops` to `struct d3dx_buffer_wrapper` - add an output `struct d3dx_buffer *` parameter to `d3dx_buffer_create()` - get rid of the ops pointer in `struct d3dx_buffer` - pass both a `struct d3dx_buffer_wrapper *` (input, const) and a `struct d3dx_buffer *` (output) parameters to `d3dx_save_pixels_to_memory()` It might be a bit more verbose but it seems cleaner to me. Unless I'm missing some kind of complication... Yeah I was mostly trying to avoid adding too many extra arguments to the function, but I agree that what you've described here looks cleaner. I _think_ I've done it the way you've described in the current revision :)
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8490#note_111364