[PATCH vkd3d 2/3] vkd3d-shader: Don't allocate memory for a string buffer ahead of time.

Henri Verbeet hverbeet at gmail.com
Mon Aug 16 16:12:09 CDT 2021


On Mon, 16 Aug 2021 at 18:49, Matteo Bruni <matteo.mystral at gmail.com> wrote:
> Makes sense (and I totally forgot, not surprising in the least). In
> that case though, I think it would be nicer to allocate the initial
> buffer in vkd3d_string_buffer_init(), like in wined3d, instead of
> having to handle it in two places (with different allocation sizes,
> and missing the case where you don't call vkd3d_string_buffer_get() at
> all).

In some ways, yes. I think the main point behind
5fb9bcdd148ed728d90a420f209cdfcc03af24ac was to make
vkd3d_string_buffer_init() never fail though, and by extension things
like vkd3d_shader_message_context_init(). I'm fine with either
variant, but would prefer not switching it back and forth every couple
of months.



More information about the wine-devel mailing list