diff --git a/Makefile.am b/Makefile.am index 01e94fa8..68e8642e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,6 +96,7 @@ vkd3d_shader_tests = \ tests/hlsl/effect-technique-fx_2.shader_test \ tests/hlsl/effect-technique-fx_4.shader_test \ tests/hlsl/effect-technique-fx_5.shader_test \ + tests/hlsl/effect-variables-fx_2.shader_test \ tests/hlsl/entry-point-semantics.shader_test \ tests/hlsl/exp.shader_test \ tests/hlsl/expr-indexing.shader_test \ diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index ce47867b..0bc5a8c3 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -643,6 +643,7 @@ static uint32_t write_fx_2_parameter(const struct hlsl_type *type, const char *n switch (type->base_type) { + case HLSL_TYPE_HALF: case HLSL_TYPE_FLOAT: case HLSL_TYPE_BOOL: case HLSL_TYPE_INT: diff --git a/tests/hlsl/effect-variables-fx_2.shader_test b/tests/hlsl/effect-variables-fx_2.shader_test new file mode 100644 index 00000000..ab992253 --- /dev/null +++ b/tests/hlsl/effect-variables-fx_2.shader_test @@ -0,0 +1,11 @@ +[require] +shader model < 3.0 + +[effect] +bool _bool; +float _float; +half _half; + +technique +{ +}