vkd3d-shader/fx: Use more descriptive names for FX-specific types.

This commit is contained in:
Nikolay Sivov 2024-08-07 18:10:55 +02:00 committed by Henri Verbeet
parent 9fb23b9090
commit d55a709992
Notes: Henri Verbeet 2024-08-08 23:48:51 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/986

View File

@ -1498,11 +1498,11 @@ enum state_property_component_type
FX_FLOAT, FX_FLOAT,
FX_UINT, FX_UINT,
FX_UINT8, FX_UINT8,
FX_DS_STATE, FX_DEPTHSTENCIL,
FX_RAST_STATE, FX_RASTERIZER,
FX_DS, FX_DOMAINSHADER,
FX_HS, FX_HULLSHADER,
FX_CS, FX_COMPUTESHADER,
FX_TEXTURE, FX_TEXTURE,
}; };
@ -1510,11 +1510,11 @@ static inline bool is_object_fx_type(enum state_property_component_type type)
{ {
switch (type) switch (type)
{ {
case FX_DS_STATE: case FX_DEPTHSTENCIL:
case FX_RAST_STATE: case FX_RASTERIZER:
case FX_DS: case FX_DOMAINSHADER:
case FX_HS: case FX_HULLSHADER:
case FX_CS: case FX_COMPUTESHADER:
case FX_TEXTURE: case FX_TEXTURE:
return true; return true;
default: default:
@ -1526,15 +1526,15 @@ static inline enum hlsl_type_class hlsl_type_class_from_fx_type(enum state_prope
{ {
switch (type) switch (type)
{ {
case FX_DS_STATE: case FX_DEPTHSTENCIL:
return HLSL_CLASS_DEPTH_STENCIL_STATE; return HLSL_CLASS_DEPTH_STENCIL_STATE;
case FX_RAST_STATE: case FX_RASTERIZER:
return HLSL_CLASS_RASTERIZER_STATE; return HLSL_CLASS_RASTERIZER_STATE;
case FX_DS: case FX_DOMAINSHADER:
return HLSL_CLASS_DOMAIN_SHADER; return HLSL_CLASS_DOMAIN_SHADER;
case FX_HS: case FX_HULLSHADER:
return HLSL_CLASS_HULL_SHADER; return HLSL_CLASS_HULL_SHADER;
case FX_CS: case FX_COMPUTESHADER:
return HLSL_CLASS_COMPUTE_SHADER; return HLSL_CLASS_COMPUTE_SHADER;
case FX_TEXTURE: case FX_TEXTURE:
return HLSL_CLASS_TEXTURE; return HLSL_CLASS_TEXTURE;
@ -1668,8 +1668,8 @@ static void resolve_fx_4_state_block_values(struct hlsl_ir_var *var, struct hlsl
} }
states[] = states[] =
{ {
{ "RasterizerState", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_RAST_STATE, 1, 0 }, { "RasterizerState", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_RASTERIZER, 1, 0 },
{ "DepthStencilState", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_DS_STATE, 1, 1 }, { "DepthStencilState", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_DEPTHSTENCIL, 1, 1 },
{ "DS_StencilRef", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_UINT, 1, 9 }, { "DS_StencilRef", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_UINT, 1, 9 },
{ "FillMode", HLSL_CLASS_RASTERIZER_STATE, HLSL_CLASS_SCALAR, FX_UINT, 1, 12, fill_values }, { "FillMode", HLSL_CLASS_RASTERIZER_STATE, HLSL_CLASS_SCALAR, FX_UINT, 1, 12, fill_values },
@ -1710,9 +1710,9 @@ static void resolve_fx_4_state_block_values(struct hlsl_ir_var *var, struct hlsl
{ "MaxLOD", HLSL_CLASS_SAMPLER, HLSL_CLASS_SCALAR, FX_FLOAT, 1, 54 }, { "MaxLOD", HLSL_CLASS_SAMPLER, HLSL_CLASS_SCALAR, FX_FLOAT, 1, 54 },
{ "Texture", HLSL_CLASS_SAMPLER, HLSL_CLASS_SCALAR, FX_TEXTURE, 1, 55 }, { "Texture", HLSL_CLASS_SAMPLER, HLSL_CLASS_SCALAR, FX_TEXTURE, 1, 55 },
{ "HullShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_HS, 1, 56 }, { "HullShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_HULLSHADER, 1, 56 },
{ "DomainShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_DS, 1, 57 }, { "DomainShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_DOMAINSHADER, 1, 57 },
{ "ComputeShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_CS, 1, 58 }, { "ComputeShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_COMPUTESHADER, 1, 58 },
}; };
const struct hlsl_type *type = hlsl_get_multiarray_element_type(var->data_type); const struct hlsl_type *type = hlsl_get_multiarray_element_type(var->data_type);
struct replace_state_context replace_context; struct replace_state_context replace_context;