mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/fx: Handle SetRasterizerState().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
784e69a366
commit
2cbad81b55
Notes:
Henri Verbeet
2024-08-06 16:59:31 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/985
@ -1480,6 +1480,7 @@ enum state_property_component_type
|
|||||||
FX_UINT,
|
FX_UINT,
|
||||||
FX_UINT8,
|
FX_UINT8,
|
||||||
FX_DS_STATE,
|
FX_DS_STATE,
|
||||||
|
FX_RAST_STATE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline bool is_object_fx_type(enum state_property_component_type type)
|
static inline bool is_object_fx_type(enum state_property_component_type type)
|
||||||
@ -1487,6 +1488,7 @@ static inline bool is_object_fx_type(enum state_property_component_type type)
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case FX_DS_STATE:
|
case FX_DS_STATE:
|
||||||
|
case FX_RAST_STATE:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@ -1499,6 +1501,8 @@ static inline enum hlsl_type_class hlsl_type_class_from_fx_type(enum state_prope
|
|||||||
{
|
{
|
||||||
case FX_DS_STATE:
|
case FX_DS_STATE:
|
||||||
return HLSL_CLASS_DEPTH_STENCIL_STATE;
|
return HLSL_CLASS_DEPTH_STENCIL_STATE;
|
||||||
|
case FX_RAST_STATE:
|
||||||
|
return HLSL_CLASS_RASTERIZER_STATE;
|
||||||
default:
|
default:
|
||||||
vkd3d_unreachable();
|
vkd3d_unreachable();
|
||||||
}
|
}
|
||||||
@ -1629,6 +1633,7 @@ 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 },
|
||||||
{ "DepthStencilState", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_DS_STATE, 1, 1 },
|
{ "DepthStencilState", HLSL_CLASS_PASS, HLSL_CLASS_SCALAR, FX_DS_STATE, 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 },
|
||||||
|
|
||||||
|
@ -4,11 +4,13 @@ shader model < 6.0
|
|||||||
|
|
||||||
[effect]
|
[effect]
|
||||||
DepthStencilState ds;
|
DepthStencilState ds;
|
||||||
|
RasterizerState rs;
|
||||||
|
|
||||||
technique11
|
technique11
|
||||||
{
|
{
|
||||||
pass
|
pass
|
||||||
{
|
{
|
||||||
SetDepthStencilState(ds, 123);
|
SetDepthStencilState(ds, 123);
|
||||||
|
SetRasterizerState(rs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user