Francisco Casas
a838f97e3f
vkd3d-shader/hlsl: Cast to bool before applying LOGIC_NOT.
...
Before this commit, it is possible for one of the tests of
cf-cond-types.shader_test to pass a non-bool to LOGIC_NOT, which should
not be allowed.
2024-03-27 22:37:07 +01:00
Nikolay Sivov
e0ef45c0a3
vkd3d-shader: Parse a 'single' modifier.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:50 +01:00
Nikolay Sivov
cf7c05f431
vkd3d-shader: Remove a token for 'precise' modifier.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:50 +01:00
Nikolay Sivov
7f1fdd447c
vkd3d-shader/fx: Add initial support for writing uninitialized vertex/pixel shader objects.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:40 +01:00
Nikolay Sivov
75c019074a
vkd3d-shader/hlsl: Allow modifiers on buffer declarations.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-08 23:35:40 +01:00
Nikolay Sivov
b13d60d805
vkd3d-shader/hlsl: Add determinant() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-08 23:35:23 +01:00
Nikolay Sivov
dd5e42d347
vkd3d-shader/hlsl: Allow technique10 {} blocks for fx_2_0.
...
Such techniques are ignored later, but do not cause compilation errors.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:18 +01:00
Nikolay Sivov
5edbccd33b
vkd3d-shader/hlsl: Add keyword tokens for fx_5_0 shader object types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:16 +01:00
Nikolay Sivov
371be3b60a
vkd3d-shader/hlsl: Add DepthStencilView object type.
2024-02-22 22:45:26 +01:00
Nikolay Sivov
c2b1714c5c
vkd3d-shader/hlsl: Add RenderTargetView object type.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-22 22:45:21 +01:00
Petrichor Park
02a3667822
vkd3d-shader/hlsl: Implement atan and atan2.
...
Also narrows some more todos on the tests.
2024-02-21 23:23:13 +01:00
Petrichor Park
69294c290b
vkd3d-shader/hlsl: Implement acos and asin trig intrinsics.
...
Tests have already been implemented in 92044d5e; this commit also reduces
the scope of some of the todos (because now they're implemented!).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55154
2024-02-21 23:23:11 +01:00
Henri Verbeet
d4223a03c8
vkd3d-shader/hlsl: Replace HLSL_MODIFIER_RASTERIZER_ORDERED with a hlsl_type.e.resource flag.
2024-02-21 23:23:08 +01:00
Henri Verbeet
49d14613a5
vkd3d-shader/hlsl: Introduce hlsl_type.e.resource.
2024-02-21 23:23:06 +01:00
Francisco Casas
8df34fce62
vkd3d-shader/hlsl: Emit fixme on non-direct resource stores.
...
Co-authored-by: Giovanni Mascellani <gmascellani@codeweavers.com>
These may happen when storing to structured buffers, and we are not
handling them properly yet. The included test reaches unreacheable code
before this patch.
Storing to buffers is complicated since we need to split the index
chain in two paths:
- The path within the variable where the resource is.
- The subpath to the part of the resource element that is being stored
to.
For now, we will emit a fixme when the index chain in the lhs is not a
direct resource access.
2024-02-19 21:12:14 +01:00
Francisco Casas
c249461e97
vkd3d-shader/hlsl: Parse Buffer types.
2024-02-19 21:11:55 +01:00
Francisco Casas
e1c759e1c9
vkd3d-shader/hlsl: Record valid methods in object_methods[].
...
Also, call hlsl_sampler_dim_count() and hlsl_offset_dim_count() after
type checking, to avoid reaching unreacheable cases.
2024-02-19 21:11:46 +01:00
Evan Tang
ee867bd470
vkd3d-shader/hlsl: Parse rasteriser-ordered view types.
2024-02-15 23:29:46 +01:00
Giovanni Mascellani
5905489b7f
vkd3d-shader/hlsl: Free the selector in postfix_expr (Valgrind).
2024-02-09 22:47:46 +01:00
Giovanni Mascellani
a10de1b239
vkd3d-shader/hlsl: Free the individual attributes in func_prototype (Valgrind).
2024-02-09 22:47:45 +01:00
Giovanni Mascellani
049327a270
vkd3d-shader/hlsl: Free the parse initializer in attribute (Valgrind).
2024-02-09 22:47:44 +01:00
Giovanni Mascellani
521082afbe
vkd3d-shader/hlsl: Free variable identifiers in primary_expr (Valgrind).
2024-02-09 22:47:42 +01:00
Zebediah Figura
a8b0c03912
vkd3d-shader/hlsl: Always cast to bool in if() statements.
...
We emit sm4 if_nz for these, but that does a bitwise comparison to zero, which is wrong for floats.
2024-01-23 20:26:46 +01:00
Zebediah Figura
183172eff4
vkd3d-shader/hlsl: Validate that condition expressions are numeric.
2024-01-23 20:26:45 +01:00
Zebediah Figura
09220edd21
vkd3d-shader/hlsl: Validate the condition data type for loops as well.
2024-01-23 20:26:44 +01:00
Nikolay Sivov
2c1905b780
vkd3d-shader/hlsl: Allow annotations on techniques.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-23 20:26:19 +01:00
Nikolay Sivov
76a689d43f
vkd3d-shader/hlsl: Allow annotations on passes.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-23 20:26:18 +01:00
Nikolay Sivov
e72f8f9a30
vkd3d-shader/hlsl: Add passes variables to the techniques.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-23 20:26:16 +01:00
Nikolay Sivov
fe8881747b
vkd3d-shader/hlsl: Add initial support for parsing annotations.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-23 20:26:15 +01:00
Zebediah Figura
9ad48f16ea
vkd3d-shader/hlsl: Forbid mismatched argument types in ternaries.
2024-01-18 23:15:44 +01:00
Zebediah Figura
275901557c
vkd3d-shader/hlsl: Handle scalar values in ternaries.
2024-01-18 23:15:43 +01:00
Zebediah Figura
11112798c8
vkd3d-shader/hlsl: Handle scalar conditions in ternaries.
2024-01-18 23:15:42 +01:00
Zebediah Figura
2c8751478f
vkd3d-shader/hlsl: Forbid objects in ternary conditions.
2024-01-18 23:15:41 +01:00
Zebediah Figura
16962ac6f1
vkd3d-shader/hlsl: Allow non-numeric types in the ternary operator.
2024-01-17 22:28:51 +01:00
Zebediah Figura
46bd099341
vkd3d-shader/hlsl: Separate an add_ternary() helper.
2024-01-17 22:28:50 +01:00
Nikolay Sivov
e1dca9b27a
vkd3d-shader/hlsl: Add a scope for technique variables.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-15 19:57:39 +01:00
Nikolay Sivov
0a6d842ed1
vkd3d-shader/hlsl: Rename the rule for an optional name.
...
Names are optional for both techniques and passes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-15 19:57:37 +01:00
Nikolay Sivov
e527d7c1e7
vkd3d-shader/hlsl: Handle effect group statement.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:46 +01:00
Nikolay Sivov
f7a02a5da2
vkd3d-shader/hlsl: Add variables for techniques.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:45 +01:00
Nikolay Sivov
8494342fa0
vkd3d-shader/hlsl: Rename rule for top-level techniques.
...
Only technique10 and technique11 types could be nested in groups.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:43 +01:00
Nikolay Sivov
c3af1f9989
vkd3d-shader/hlsl: Add 'fxgroup' token.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:42 +01:00
Henri Verbeet
3344c4e93d
vkd3d-shader/hlsl: Store modifier flags as a uint32_t.
2024-01-08 21:45:26 +01:00
Henri Verbeet
fafe2a1dba
vkd3d-shader/hlsl: Store swizzles as a uint32_t.
2024-01-08 21:45:24 +01:00
Zebediah Figura
98a02ceffb
vkd3d-shader/hlsl: Avoid shadowing "load" in intrinsic_tex().
2023-12-07 21:57:31 +01:00
Zebediah Figura
a102e99897
vkd3d-shader/hlsl: Avoid shadowing "block" in resolve_loop_continue().
2023-12-07 21:57:30 +01:00
Nikolay Sivov
6a4a9a4518
vkd3d-shader/hlsl: Handle 'linear centroid' modifier.
2023-11-28 00:10:12 +01:00
Francisco Casas
4e1bf5e163
vkd3d-shader/hlsl: Discern between signed and unsigned ints when parsing.
2023-11-22 22:08:05 +01:00
Nikolay Sivov
e55b6a7fa1
vkd3d-shader/hlsl: Add constants to the block for log()/log10() builtins.
2023-11-20 22:07:24 +01:00
Akihiro Sagawa
aed2d142cf
vkd3d-shader/hlsl: Add degrees() function.
2023-11-20 22:07:19 +01:00
Akihiro Sagawa
e493627130
vkd3d-shader/hlsl: Add radians() function.
2023-11-20 22:07:17 +01:00