[PATCH vkd3d v3 4/5] vkd3d-shader: Use struct vkd3d_bytecode_buffer in vkd3d_shader_serialize_root_signature().

Zebediah Figura (she/her) zfigura at codeweavers.com
Thu Jul 8 19:14:52 CDT 2021


On 7/7/21 4:17 AM, Henri Verbeet wrote:
> On Tue, 6 Jul 2021 at 21:12, Zebediah Figura (she/her)
> <zfigura at codeweavers.com> wrote:
>> The problem I see with the compiler error messages is that they
>> universally try to allocate more memory than we just failed to allocate.
> 
> I don't think that's necessarily true. Both string buffers and byte
> code buffers grow by doubling the existing allocation size; the amount
> of memory they try to allocate is determined by the existing size, not
> the amount of data we try to write to it. It's also very well possible
> that the error message string buffer still has sufficient remaining
> space to not require growing in order to write the message.
> (Incidentally, it's not entirely inconceivable that future versions of
> the API would support simply writing directly to stdin/stdout/stderr,
> perhaps even by using custom input/output/error callbacks.)

Sorry, that's true; I miscalculated.

I'll change this to emit one (and only one) out-of-memory message.



More information about the wine-devel mailing list