vkd3d-shader/hlsl: Add field-level documentation to struct hlsl_buffer.

This commit is contained in:
Francisco Casas 2022-11-16 14:02:15 -03:00 committed by Alexandre Julliard
parent ba56833bb5
commit c68d0ecfe0
Notes: Alexandre Julliard 2023-01-19 22:45:24 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/61

View File

@ -612,15 +612,25 @@ enum hlsl_buffer_type
HLSL_BUFFER_TEXTURE, HLSL_BUFFER_TEXTURE,
}; };
/* In SM4, uniform variables are organized in different buffers. Besides buffers defined in the
* source code, there is also the implicit $Globals buffer and the implicit $Params buffer,
* to which uniform globals and parameters belong by default. */
struct hlsl_buffer struct hlsl_buffer
{ {
struct vkd3d_shader_location loc; struct vkd3d_shader_location loc;
enum hlsl_buffer_type type; enum hlsl_buffer_type type;
const char *name; const char *name;
/* Register reserved for this buffer, if any.
* If provided, it should be of type 'b' if type is HLSL_BUFFER_CONSTANT and 't' if type is
* HLSL_BUFFER_TEXTURE. */
struct hlsl_reg_reservation reservation; struct hlsl_reg_reservation reservation;
/* Item entry for hlsl_ctx.buffers */
struct list entry; struct list entry;
/* The size of the buffer (in register components), and the size of the buffer as determined
* by its last variable that's actually used. */
unsigned size, used_size; unsigned size, used_size;
/* Register of type 'b' on which the buffer is allocated. */
struct hlsl_reg reg; struct hlsl_reg reg;
}; };