mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Align the start offset instead of the size in bytecode_put_bytes().
The practical effect this has is that we avoid potential trailing padding at the end of DXBC blobs. Unfortunately this also means we need to be more careful about using bytecode_get_size() to find the offset where subsequent data would get written, although in many cases this follows a put_u32() call.
This commit is contained in:
committed by
Alexandre Julliard
parent
a0a3fb0e5f
commit
d6d9aab31c
Notes:
Alexandre Julliard
2023-04-04 22:36:34 +02:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/144
@@ -1094,6 +1094,11 @@ static inline size_t bytecode_get_size(struct vkd3d_bytecode_buffer *buffer)
|
||||
return buffer->size;
|
||||
}
|
||||
|
||||
static inline size_t bytecode_get_next_offset(struct vkd3d_bytecode_buffer *buffer)
|
||||
{
|
||||
return align(buffer->size, 4);
|
||||
}
|
||||
|
||||
uint32_t vkd3d_parse_integer(const char *s);
|
||||
|
||||
struct vkd3d_shader_message_context
|
||||
|
Reference in New Issue
Block a user