vkd3d-shader/hlsl: Make HLSL_TYPE_SAMPLER into a separate class.

This commit is contained in:
Zebediah Figura
2024-02-05 20:13:17 -06:00
committed by Alexandre Julliard
parent f57db442b0
commit 220362cbad
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
7 changed files with 120 additions and 88 deletions

View File

@@ -79,6 +79,7 @@ enum hlsl_type_class
HLSL_CLASS_STRUCT,
HLSL_CLASS_ARRAY,
HLSL_CLASS_OBJECT,
HLSL_CLASS_SAMPLER,
HLSL_CLASS_STRING,
HLSL_CLASS_VOID,
};
@@ -92,7 +93,6 @@ enum hlsl_base_type
HLSL_TYPE_UINT,
HLSL_TYPE_BOOL,
HLSL_TYPE_LAST_SCALAR = HLSL_TYPE_BOOL,
HLSL_TYPE_SAMPLER,
HLSL_TYPE_TEXTURE,
HLSL_TYPE_UAV,
HLSL_TYPE_PIXELSHADER,
@@ -150,7 +150,7 @@ struct hlsl_type
* Otherwise, base_type is not used. */
enum hlsl_base_type base_type;
/* If base_type is HLSL_TYPE_SAMPLER, then sampler_dim is <= HLSL_SAMPLER_DIM_LAST_SAMPLER.
/* If class is HLSL_CLASS_SAMPLER, then sampler_dim is <= HLSL_SAMPLER_DIM_LAST_SAMPLER.
* If base_type is HLSL_TYPE_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,
@@ -172,7 +172,6 @@ struct hlsl_type
* 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_SAMPLER, then both dimx = 1 and dimy = 1.
* If base_type is HLSL_TYPE_TEXTURE, then dimx = 4 and dimy = 1.
* If base_type is HLSL_TYPE_UAV, then dimx is the dimx of e.resource_format, and dimy = 1.
*/