mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/fx: Handle "Texture" field of the sampler state objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
8b6ab9627d
commit
9fb23b9090
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
@ -1503,6 +1503,7 @@ enum state_property_component_type
|
||||
FX_DS,
|
||||
FX_HS,
|
||||
FX_CS,
|
||||
FX_TEXTURE,
|
||||
};
|
||||
|
||||
static inline bool is_object_fx_type(enum state_property_component_type type)
|
||||
@ -1514,6 +1515,7 @@ static inline bool is_object_fx_type(enum state_property_component_type type)
|
||||
case FX_DS:
|
||||
case FX_HS:
|
||||
case FX_CS:
|
||||
case FX_TEXTURE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@ -1534,6 +1536,8 @@ static inline enum hlsl_type_class hlsl_type_class_from_fx_type(enum state_prope
|
||||
return HLSL_CLASS_HULL_SHADER;
|
||||
case FX_CS:
|
||||
return HLSL_CLASS_COMPUTE_SHADER;
|
||||
case FX_TEXTURE:
|
||||
return HLSL_CLASS_TEXTURE;
|
||||
default:
|
||||
vkd3d_unreachable();
|
||||
}
|
||||
@ -1704,7 +1708,7 @@ static void resolve_fx_4_state_block_values(struct hlsl_ir_var *var, struct hlsl
|
||||
{ "BorderColor", HLSL_CLASS_SAMPLER, HLSL_CLASS_VECTOR, FX_FLOAT, 4, 52 },
|
||||
{ "MinLOD", HLSL_CLASS_SAMPLER, HLSL_CLASS_SCALAR, FX_FLOAT, 1, 53 },
|
||||
{ "MaxLOD", HLSL_CLASS_SAMPLER, HLSL_CLASS_SCALAR, FX_FLOAT, 1, 54 },
|
||||
/* TODO: "Texture" field */
|
||||
{ "Texture", HLSL_CLASS_SAMPLER, HLSL_CLASS_SCALAR, FX_TEXTURE, 1, 55 },
|
||||
|
||||
{ "HullShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_HS, 1, 56 },
|
||||
{ "DomainShader", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_DS, 1, 57 },
|
||||
|
@ -17,3 +17,26 @@ struct s
|
||||
};
|
||||
|
||||
s var;
|
||||
|
||||
[effect]
|
||||
Texture t1;
|
||||
Texture1D t2;
|
||||
Texture1DArray t3;
|
||||
Texture2D t4;
|
||||
Texture2DArray t5;
|
||||
Texture2DMS<float4, 4> t6;
|
||||
Texture2DMSArray <float4, 4> t7;
|
||||
Texture3D t8;
|
||||
TextureCube t9;
|
||||
TextureCubeArray t10;
|
||||
|
||||
SamplerState sampler1 { Texture = t1; };
|
||||
SamplerState sampler2 { Texture = t2; };
|
||||
SamplerState sampler3 { Texture = t3; };
|
||||
SamplerState sampler4 { Texture = t4; };
|
||||
SamplerState sampler5 { Texture = t5; };
|
||||
SamplerState sampler6 { Texture = t6; };
|
||||
SamplerState sampler7 { Texture = t7; };
|
||||
SamplerState sampler8 { Texture = t8; };
|
||||
SamplerState sampler9 { Texture = t9; };
|
||||
SamplerState sampler10 { Texture = t10; };
|
||||
|
@ -17,3 +17,26 @@ struct s
|
||||
};
|
||||
|
||||
s var;
|
||||
|
||||
[effect]
|
||||
Texture t1;
|
||||
Texture1D t2;
|
||||
Texture1DArray t3;
|
||||
Texture2D t4;
|
||||
Texture2DArray t5;
|
||||
Texture2DMS<float4, 4> t6;
|
||||
Texture2DMSArray <float4, 4> t7;
|
||||
Texture3D t8;
|
||||
TextureCube t9;
|
||||
TextureCubeArray t10;
|
||||
|
||||
SamplerState sampler1 { Texture = t1; };
|
||||
SamplerState sampler2 { Texture = t2; };
|
||||
SamplerState sampler3 { Texture = t3; };
|
||||
SamplerState sampler4 { Texture = t4; };
|
||||
SamplerState sampler5 { Texture = t5; };
|
||||
SamplerState sampler6 { Texture = t6; };
|
||||
SamplerState sampler7 { Texture = t7; };
|
||||
SamplerState sampler8 { Texture = t8; };
|
||||
SamplerState sampler9 { Texture = t9; };
|
||||
SamplerState sampler10 { Texture = t10; };
|
||||
|
Loading…
Reference in New Issue
Block a user