mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Make HLSL_TYPE_UAV into a separate class.
This commit is contained in:
committed by
Alexandre Julliard
parent
93d7cd1785
commit
171e097268
Notes:
Alexandre Julliard
2024-04-19 22:26:17 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/781
@@ -82,6 +82,7 @@ enum hlsl_type_class
|
||||
HLSL_CLASS_SAMPLER,
|
||||
HLSL_CLASS_STRING,
|
||||
HLSL_CLASS_TEXTURE,
|
||||
HLSL_CLASS_UAV,
|
||||
HLSL_CLASS_VOID,
|
||||
};
|
||||
|
||||
@@ -94,7 +95,6 @@ enum hlsl_base_type
|
||||
HLSL_TYPE_UINT,
|
||||
HLSL_TYPE_BOOL,
|
||||
HLSL_TYPE_LAST_SCALAR = HLSL_TYPE_BOOL,
|
||||
HLSL_TYPE_UAV,
|
||||
HLSL_TYPE_PIXELSHADER,
|
||||
HLSL_TYPE_VERTEXSHADER,
|
||||
HLSL_TYPE_PASS,
|
||||
@@ -153,7 +153,7 @@ struct hlsl_type
|
||||
/* If class is HLSL_CLASS_SAMPLER, then sampler_dim is <= HLSL_SAMPLER_DIM_LAST_SAMPLER.
|
||||
* If class is HLSL_CLASS_TEXTURE, then sampler_dim can be any value of the enum except
|
||||
* HLSL_SAMPLER_DIM_GENERIC and HLSL_SAMPLER_DIM_COMPARISON.
|
||||
* If base_type is HLSL_TYPE_UAV, then sampler_dim must be one of HLSL_SAMPLER_DIM_1D,
|
||||
* If class is HLSL_CLASS_UAV, then sampler_dim must be one of HLSL_SAMPLER_DIM_1D,
|
||||
* HLSL_SAMPLER_DIM_2D, HLSL_SAMPLER_DIM_3D, HLSL_SAMPLER_DIM_1DARRAY, HLSL_SAMPLER_DIM_2DARRAY,
|
||||
* HLSL_SAMPLER_DIM_BUFFER, or HLSL_SAMPLER_DIM_STRUCTURED_BUFFER.
|
||||
* Otherwise, sampler_dim is not used */
|
||||
@@ -171,8 +171,6 @@ struct hlsl_type
|
||||
* If type is HLSL_CLASS_MATRIX, then dimx is the number of columns, and dimy the number of rows.
|
||||
* If type is HLSL_CLASS_ARRAY, then dimx and dimy have the same value as in the type of the array elements.
|
||||
* If type is HLSL_CLASS_STRUCT, then dimx is the sum of (dimx * dimy) of every component, and dimy = 1.
|
||||
* If type is HLSL_CLASS_OBJECT, dimx and dimy depend on the base_type:
|
||||
* If base_type is HLSL_TYPE_UAV, then dimx is the dimx of e.resource_format, and dimy = 1.
|
||||
*/
|
||||
unsigned int dimx;
|
||||
unsigned int dimy;
|
||||
@@ -194,8 +192,8 @@ struct hlsl_type
|
||||
/* Array length, or HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT if it is not known yet at parse time. */
|
||||
unsigned int elements_count;
|
||||
} array;
|
||||
/* Additional information if the base_type is HLSL_TYPE_TEXTURE or
|
||||
* HLSL_TYPE_UAV. */
|
||||
/* Additional information if the class is HLSL_CLASS_TEXTURE or
|
||||
* HLSL_CLASS_UAV. */
|
||||
struct
|
||||
{
|
||||
/* Format of the data contained within the type. */
|
||||
|
Reference in New Issue
Block a user