mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Write SM5.1 register indices.
Separate ID and index. Allocate IDs for all external resources (but ignore them for shader models other than 5).
This commit is contained in:
committed by
Henri Verbeet
parent
19a13740de
commit
28a5e23814
Notes:
Henri Verbeet
2024-06-11 17:09:29 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/865
@@ -259,8 +259,18 @@ struct hlsl_struct_field
|
||||
* struct. */
|
||||
struct hlsl_reg
|
||||
{
|
||||
/* Index of the first register allocated. */
|
||||
/* Register number of the first register allocated. */
|
||||
uint32_t id;
|
||||
/* For descriptors (buffer, texture, sampler, UAV) this is the base binding
|
||||
* index of the descriptor.
|
||||
* For 5.1 and above descriptors have space and may be arrayed, in which
|
||||
* case the array shares a single register ID but has a range of register
|
||||
* indices, and "id" and "index" are as a rule not equal.
|
||||
* For versions below 5.1, the register number for descriptors is the same
|
||||
* as its external binding index, so only "index" is used, and "id" is
|
||||
* ignored.
|
||||
* For numeric registers "index" is not used. */
|
||||
uint32_t index;
|
||||
/* Number of registers to be allocated.
|
||||
* Unlike the variable's type's regsize, it is not expressed in register components, but rather
|
||||
* in whole registers, and may depend on which components are used within the shader. */
|
||||
|
||||
Reference in New Issue
Block a user