mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Make min16uint into a first-class type.
And properly implement translation into some binary enumerations.
This commit is contained in:
committed by
Henri Verbeet
parent
16be9181a0
commit
18ca7affad
Notes:
Henri Verbeet
2025-03-06 17:32:40 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1387
@@ -1496,7 +1496,11 @@ static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hl
|
||||
return HLSL_TYPE_FLOAT;
|
||||
if (t1 == HLSL_TYPE_UINT || t2 == HLSL_TYPE_UINT)
|
||||
return HLSL_TYPE_UINT;
|
||||
return HLSL_TYPE_INT;
|
||||
if (t1 == HLSL_TYPE_INT || t2 == HLSL_TYPE_INT)
|
||||
return HLSL_TYPE_INT;
|
||||
if (t1 == HLSL_TYPE_MIN16UINT || t2 == HLSL_TYPE_MIN16UINT)
|
||||
return HLSL_TYPE_MIN16UINT;
|
||||
vkd3d_unreachable();
|
||||
}
|
||||
|
||||
static bool expr_common_shape(struct hlsl_ctx *ctx, struct hlsl_type *t1, struct hlsl_type *t2,
|
||||
@@ -2836,6 +2840,7 @@ static enum hlsl_base_type hlsl_base_type_class(enum hlsl_base_type t)
|
||||
return HLSL_TYPE_FLOAT;
|
||||
|
||||
case HLSL_TYPE_INT:
|
||||
case HLSL_TYPE_MIN16UINT:
|
||||
case HLSL_TYPE_UINT:
|
||||
return HLSL_TYPE_INT;
|
||||
|
||||
@@ -2851,6 +2856,7 @@ static unsigned int hlsl_base_type_width(enum hlsl_base_type t)
|
||||
switch (t)
|
||||
{
|
||||
case HLSL_TYPE_HALF:
|
||||
case HLSL_TYPE_MIN16UINT:
|
||||
return 16;
|
||||
|
||||
case HLSL_TYPE_FLOAT:
|
||||
|
||||
Reference in New Issue
Block a user