From: Francisco Casas fcasas@codeweavers.com
--- libs/vkd3d-shader/hlsl.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 06c9aefc..1bf0a964 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -554,15 +554,25 @@ enum hlsl_buffer_type HLSL_BUFFER_TEXTURE, };
+/* HLSL buffer to group a set of uniform variables. */ struct hlsl_buffer { + /* Location of the buffer declaration in the HLSL shader. */ struct vkd3d_shader_location loc; + /* Type of buffer. */ enum hlsl_buffer_type type; + /* Name of the buffer */ const char *name; + /* Used to reserve a particular register as the starting point for the variables' values. */ struct hlsl_reg_reservation reservation; + /* Linked list entry for storing the buffer in the context's list of buffers. */ 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; + /* Register on which the buffer is allocated. + * In case that the buffer uses more than one register, this refers to the first one. */ struct hlsl_reg reg; };