Francisco Casas
6b4a4c4c6d
vkd3d-shader/hlsl: Expect component count in allocate_register().
...
This in order to set the correct writemasks for SM1 registers.
2023-02-08 22:09:38 +01:00
Francisco Casas
0ecac994d0
vkd3d-shader/hlsl: Rename 'component_count' arguments to 'reg_size'.
...
component_count will be used in the next patch for the actual number of
components of the type and not its register size.
2023-02-08 22:09:36 +01:00
Zebediah Figura
ab601d65cd
vkd3d-shader: Initialize the parameter allocator head.
...
This fixes a memory leak.
Fixes: 007f894b9493eb80091899dab971e369f1673a4f
2023-02-07 22:15:08 +01:00
Nikolay Sivov
91a70c7dda
vkd3d-shader/hlsl: Handle saturate() for SM1.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-02-07 22:15:06 +01:00
Zebediah Figura
77d716c811
vkd3d-shader/hlsl: Add functions to the global list inside the func_prototype rule.
2023-02-07 22:15:06 +01:00
Zebediah Figura
4c46075d86
vkd3d-shader/hlsl: Use the original hlsl_ir_function_decl struct rather than allocating a new one for each definition.
...
We need to make sure every invocation points to the same hlsl_ir_function_decl
and the same parameters.
This fixes some invalid memory accesses.
2023-02-07 22:15:06 +01:00
Zebediah Figura
25d49b518d
vkd3d-shader/hlsl: Put synthetic variables into a dummy scope.
...
Prevent them from being ever looked up.
Our naming scheme for synthetic variables already effectively prevents this, but
this is better for clarity. We also will need to be able to move some named
variables into a dummy scope to account for complexities around function
definition and declarations.
2023-02-07 22:15:06 +01:00
Zebediah Figura
8755a92196
vkd3d-shader/hlsl: Add a hlsl_cleanup_semantic() helper.
2023-02-07 22:15:06 +01:00
Zebediah Figura
cb2c89a589
vkd3d-shader/hlsl: Store function parameters in an array.
2023-02-07 22:15:06 +01:00
Zebediah Figura
721c7aa22c
tests: Add more tests for function definitions.
2023-02-07 22:15:06 +01:00
Zebediah Figura
898fc9e198
vkd3d: Fix checking for failure from SleepConditionVariableCS().
...
Fixes: 552926cfca64db45e9731f675c65a7214bfa6441
2023-02-07 22:15:06 +01:00
Matteo Bruni
2e074ebce7
vkd3d: Initialize image aspect for NULL SRVs.
2023-02-07 22:08:00 +01:00
Giovanni Mascellani
552926cfca
vkd3d: Do not allow synchronization primitives to fail.
...
In practice they never fail. If they fail, it means that there
is some underlying platform problem and there is little we can do
anyway. Under pthreads function prototypes allow returning failure,
but that's only used for "error checking" mutexes, which we
don't use.
On the other hand, error handling in vkd3d is rather inconsistent:
sometimes the errors are ignored, sometimes logged, sometimes
passed to the caller. It's hard to handle failures appropriately
if you can't even keep your state consistent, so I think it's
better to avoid trying, assume that synchronization primitives do
not fail and at least have consistent logging if something goes
wrong.
2023-02-02 20:51:27 +01:00
Zebediah Figura
a66fe31fe5
vkd3d: Do not write the point size for SPIR-V shaders.
...
We disable shaderTessellationAndGeometryPointSize.
2023-02-02 20:51:19 +01:00
Zebediah Figura
8fc8d34ea0
vkd3d-shader/spirv: Introduce an option to control whether point size is written.
2023-02-02 20:51:18 +01:00
Nikolay Sivov
06f300ec59
vkd3d-shader/hlsl: Support dot() for SM1.
2023-02-02 20:51:12 +01:00
Zebediah Figura
68c232cfab
tests: Test entry point semantics on function declarations.
2023-01-31 22:27:02 +01:00
Zebediah Figura
4954c36347
tests: Add more tests for early return from the entry point.
2023-01-31 22:27:02 +01:00
Zebediah Figura
7460d7adc2
tests: Add some tests for early return from user-defined functions.
2023-01-31 22:27:02 +01:00
Zebediah Figura
aa3badbd9d
vkd3d-shader/hlsl: Emit a hlsl_fixme() for HLSL_IR_CALL instructions.
...
Avoid outputting invalid shaders.
2023-01-31 22:27:00 +01:00
Philip Rebohle
f9e7cb6345
include: Fix incorrect UpdateTileMappings declaration.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2023-01-26 21:52:39 +01:00
Nikolay Sivov
ec00782eae
vkd3d-shader/tests: Add some exp()/exp2() tests.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-01-26 21:52:29 +01:00
Nikolay Sivov
8bb023e5af
vkd3d-shader/hlsl: Support exp() intrinsic.
2023-01-26 21:52:28 +01:00
Nikolay Sivov
8ca2f65bc1
vkd3d-shader/hlsl: Support exp2() intrinsic.
2023-01-26 21:52:26 +01:00
Nikolay Sivov
fa971f32bc
vkd3d-shader/hlsl: Write 'exp' instructions for SM1.
2023-01-26 21:52:25 +01:00