Module: vkd3d
Branch: master
Commit: c68d0ecfe0cc60d851a1b7af6f7b2b7ab91ade6c
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/c68d0ecfe0cc60d851a1b7af6f7b2…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Wed Nov 16 14:02:15 2022 -0300
vkd3d-shader/hlsl: Add field-level documentation to struct hlsl_buffer.
---
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 4d1ff0fc..bc5b5fb6 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -612,15 +612,25 @@ enum hlsl_buffer_type
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 vkd3d_shader_location loc;
enum hlsl_buffer_type type;
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;
+ /* Item entry for hlsl_ctx.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 of type 'b' on which the buffer is allocated. */
struct hlsl_reg reg;
};
Module: vkd3d
Branch: master
Commit: ba56833bb526f51297ba3115217507ad5e34babe
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/ba56833bb526f51297ba311521750…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Wed Nov 16 00:34:36 2022 -0300
vkd3d-shader/hlsl: Add documentation to small hlsl.h structs.
---
libs/vkd3d-shader/hlsl.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index 3122f382..4d1ff0fc 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -185,6 +185,8 @@ struct hlsl_type
size_t bytecode_offset;
};
+/* In HLSL, a semantic is a string linked to a variable (or a field) to be recognized across
+ * different shader stages in the graphics pipeline. */
struct hlsl_semantic
{
const char *name;
@@ -276,6 +278,7 @@ struct hlsl_ir_node
struct hlsl_block
{
+ /* List containing instruction nodes; linked by the hlsl_ir_node.entry fields. */
struct list instrs;
};
@@ -323,6 +326,8 @@ struct hlsl_attribute
#define HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT 0
+/* Reservation of a specific register to a variable, field, or buffer, written in the HLSL source
+ * using the register(·) syntax */
struct hlsl_reg_reservation
{
char type;
Module: vkd3d
Branch: master
Commit: 06b52c0343e9b11a5abd41d08e57f9ff327104e6
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/06b52c0343e9b11a5abd41d08e57f…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Wed Nov 16 00:33:20 2022 -0300
vkd3d-shader/hlsl: Add field-level documentation to struct hlsl_deref.
---
libs/vkd3d-shader/hlsl.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index c1fa37be..3122f382 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -501,13 +501,25 @@ struct hlsl_ir_swizzle
DWORD swizzle;
};
+/* Reference to a variable, or a part of it (e.g. a vector within a matrix within a struct). */
struct hlsl_deref
{
struct hlsl_ir_var *var;
+ /* An array of references to instruction nodes, of data type uint, that are used to reach the
+ * desired part of the variable.
+ * If path_len is 0, then this is a reference to the whole variable.
+ * The value of each instruction node in the path corresponds to the index of the element/field
+ * that has to be selected on each nesting level to reach this part.
+ * The path shall not contain additional values once a type that cannot be subdivided
+ * (a.k.a. "component") is reached. */
unsigned int path_len;
struct hlsl_src *path;
+ /* Single instruction node of data type uint used to represent the register offset (in register
+ * components), from the start of the variable, of the part referenced.
+ * The path is lowered to this single offset -- whose value may vary between SM1 and SM4 --
+ * before writing the bytecode. */
struct hlsl_src offset;
};
Module: vkd3d
Branch: master
Commit: f33d433621aa7932ef8e06070e21bb6c177cb19c
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/f33d433621aa7932ef8e06070e21b…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Wed Nov 16 00:07:03 2022 -0300
vkd3d-shader/hlsl: Add documentation to struct hlsl_reg.
---
libs/vkd3d-shader/hlsl.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index 14070239..c1fa37be 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -210,10 +210,18 @@ struct hlsl_struct_field
size_t name_bytecode_offset;
};
+/* Information of the register allocated for an instruction node or variable.
+ * These values are initialized at the end of hlsl_emit_bytecode(), after the compilation passes,
+ * just before writing the bytecode.
+ * For numeric registers, a writemask can be provided to indicate the reservation of only some of the
+ * 4 components.
+ * The type of register (register class) is implied from its use, so it is not stored in this
+ * struct. */
struct hlsl_reg
{
uint32_t id;
unsigned int writemask;
+ /* Whether the register has been allocated. */
bool allocated;
};
@@ -553,6 +561,7 @@ struct hlsl_ir_constant
float f;
double d;
} value[4];
+ /* Constant register of type 'c' where the constant value is stored for SM1. */
struct hlsl_reg reg;
};
Module: wine
Branch: master
Commit: 31792f43701d74589e2f06dc5b6446a84d5d4614
URL: https://gitlab.winehq.org/wine/wine/-/commit/31792f43701d74589e2f06dc5b6446…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Jan 17 19:39:41 2023 +0100
nsi: Add some margin to the tables size in NsiAllocateAndGetTable().
The table size typically keeps increasing such that in some cases the
size we got is already too small by the time we try to get the table
content in the next iteration.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54328
---
dlls/nsi/nsi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/nsi/nsi.c b/dlls/nsi/nsi.c
index 6d8ae40a5c7..3f324ef555b 100644
--- a/dlls/nsi/nsi.c
+++ b/dlls/nsi/nsi.c
@@ -71,6 +71,7 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
err = NsiEnumerateObjectsAllParameters( unk, 0, module, table, NULL, 0, NULL, 0, NULL, 0, NULL, 0, &num );
if (err) return err;
err = ERROR_OUTOFMEMORY; /* fail if this is the last attempt */
+ num += num >> 4; /* the tables may grow before the next iteration; get ahead */
}
if (!err)