Commit Graph

427 Commits

Author SHA1 Message Date
Nikolay Sivov
1ce68cee2c vkd3d-shader/hlsl: Tokenize 'String' the same as 'string'.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-14 22:00:35 +02:00
Francisco Casas
094e298c1c vkd3d-shader/hlsl: Parse string default values. 2024-08-13 21:19:01 +02:00
Francisco Casas
f8108a4753 tests: Add additional string tests. 2024-08-13 21:16:46 +02:00
Nikolay Sivov
e0b5fe1288 vkd3d-shader/hlsl: Add a test for assigning to DSV and RTV variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-13 21:11:48 +02:00
Nikolay Sivov
b4d957f848 vkd3d-shader/hlsl: Handle NULL constants.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-13 21:10:45 +02:00
Nikolay Sivov
d945d5e78c vkd3d-shader/hlsl: Check MS texture declaration without sample count only for used variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-13 21:10:29 +02:00
Nikolay Sivov
b0ca3627bf vkd3d-shader/fx: Turn assignments to arrays to element assignments for certain states. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
25e1c3e374 vkd3d-shader/fx: Explicitly handle bool values in state entries. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
c81223d086 vkd3d-shader/fx: Handle states of a BlendState object. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
f1e65ecc83 vkd3d-shader/fx: Enable writing BlendState variables. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
91e88fac2e vkd3d-shader/hlsl: Add parser support for BlendState type. 2024-08-12 14:15:14 +02:00
Nikolay Sivov
de48960b33 vkd3d-shader/fx: Add support for the OMSetRenderTargets() state. 2024-08-08 23:42:37 +02:00
Nikolay Sivov
9fb23b9090 vkd3d-shader/fx: Handle "Texture" field of the sampler state objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-08 23:42:37 +02:00
Victor Chiletto
8c3a5e5458 vkd3d-shader/hlsl: Implement f16tof32 intrinsic. 2024-08-08 23:35:02 +02:00
Francisco Casas
016be7e591 vkd3d-shader/hlsl: Lower non-constant row_major matrix loads for SM1. 2024-08-08 23:33:33 +02:00
Francisco Casas
87f01f5205 vkd3d-shader/hlsl: Remove SM1 fixme for matrix writemasks.
hlsl_ir_store instructions don't use writemasks for whole matrices.
2024-08-08 23:32:03 +02:00
Francisco Casas
9f515a9daa vkd3d-shader/hlsl: Lower non-constant array loads for SM1.
This is achieved by means of creating a variable storing zero,
loading every array element, comparing if the non-constant index
matches the index of that element at runtime, and in that case
store the corresponding element in the variable.

This seems to be the same strategy that the native compiler uses.
2024-08-08 23:30:39 +02:00
Francisco Casas
e0cfd8f86a tests: Add additional non-constant array indexing tests. 2024-08-08 23:28:31 +02:00
Francisco Casas
84676c378f tests: Add missing double precission require directives.
Otherwise these tests fail on Intel UHD Graphics 770.
2024-08-07 15:54:36 +02:00
Francisco Casas
090df488ba vkd3d-shader/hlsl: Parse string constants. 2024-08-07 15:48:59 +02:00
Francisco Casas
4b2e847d11 tests: Test string escape sequences. 2024-08-07 15:45:24 +02:00
Nikolay Sivov
c44a18b3d1 vkd3d-shader/fx: Add support for SetDomainShader(), SetComputeShader(), and SetHullShader() states.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-06 16:54:19 +02:00
Nikolay Sivov
2cbad81b55 vkd3d-shader/fx: Handle SetRasterizerState().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-06 16:54:19 +02:00
Nikolay Sivov
a3f4785720 vkd3d-shader/fx: Decompose function-style state assignments to individual states.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-08-05 16:01:33 +02:00
Elizabeth Figura
947b937a1a tests: Test shade mode. 2024-07-24 16:08:10 +02:00
Victor Chiletto
a0de05f0b4 vkd3d-shader/hlsl: Implement the asint() intrinsic. 2024-07-24 16:06:03 +02:00
Shaun Ren
49caeee1fd vkd3d-shader/hlsl: Support default values for function parameters. 2024-07-23 15:36:32 +02:00
Nikolay Sivov
dcf4ce753b vkd3d-shader/fx: Correct empty pass check.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-23 15:23:54 +02:00
Nikolay Sivov
958117df2f vkd3d-shader/hlsl: Allow annotations on global variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-23 15:23:54 +02:00
Shaun Ren
0202393d41 vkd3d-shader/d3dbc: Implement HLSL_OP1_{COS,SIN}_REDUCED for SM1.
Also enable SM1 trigonometry function tests.
2024-07-16 19:03:52 +02:00
Elizabeth Figura
5a53b73995 tests: Test alpha test. 2024-07-11 17:02:53 +02:00
Petrichor Park
bec4f413dc vkd3d-shader/tpf: Implmenent HLSL_OP1_RCP.
SM5 comes with a RCP opcode; for SM4, implement it as `DIV dst, 1, x`.
2024-07-11 16:44:16 +02:00
Petrichor Park
b3f0cd5788 vkd3d-shader/hlsl: Implement the rcp() intrinisic.
SM1 already has the RCP opcode implemented; SM4 implementation is in the
next commit.
2024-07-11 16:44:02 +02:00
Petrichor Park
3a49852075 vkd3d-shader/hlsl: Implement tests for the rcp() intrinsic. 2024-07-11 16:43:48 +02:00
Elizabeth Figura
59f770214a vkd3d-shader/hlsl: Implement output SV_Coverage. 2024-07-11 00:33:57 +02:00
Elizabeth Figura
71a3d55e8c vkd3d-shader/hlsl: Implement the GetRenderTargetSampleCount() intrinsic. 2024-07-11 00:33:57 +02:00
Victor Chiletto
76ae871f5b tests/hlsl: Test loop unrolling edge cases. 2024-07-11 00:32:53 +02:00
Victor Chiletto
2034a8bab9 vkd3d-shader/hlsl: Implement loop unrolling.
Based on a patch by Nikolay Sivov.

Co-authored-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-11 00:32:53 +02:00
Victor Chiletto
900433e371 tests/hlsl: Add a test for dynamically indexed multisampled texture loads. 2024-07-11 00:31:06 +02:00
Petrichor Park
746222b349 vkd3d-shader/hlsl: Implement the faceforward() intrinsic. 2024-07-09 20:43:41 +02:00
Francisco Casas
60c8a813a3 vkd3d-shader/hlsl: Validate state block function calls. 2024-07-09 20:38:08 +02:00
Francisco Casas
af7c4010f4 tests: Test whether valid state block function names are case-sensitive. 2024-07-09 20:37:20 +02:00
Francisco Casas
b5f2e7daeb vkd3d-shader/hlsl: Parse function call syntax on state blocks. 2024-07-09 20:36:28 +02:00
Francisco Casas
f15d8dc9e9 tests: Separate the valid stateblock function names test from the string arg test.
This test is important because it checks that all the valid names for
stateblock functions with the expected amount of arguments are tested,
but, after parsing state block function calls, the only reason it is
not passing is that we don't parse strings yet.
2024-07-09 20:34:17 +02:00
Nikolay Sivov
3dc43e8945 vkd3d-shader: Disallow object structure fields for fx profiles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:49:28 +02:00
Nikolay Sivov
c8720f1229 tests: Add some fx profiles tests for structure types containing objects.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:49:28 +02:00
Nikolay Sivov
937a80ead6 vkd3d-shader/fx: Write annotations for fx_4+ profiles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:49:28 +02:00
Nikolay Sivov
0f7ac0a054 vkd3d-shader/hlsl: Set default values for annotations variables.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:49:06 +02:00
Nikolay Sivov
4d2ce385a7 vkd3d-shader/hlsl: Do not crash on initialization of a redefined variable.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:24:46 +02:00
Nikolay Sivov
2176294df8 vkd3d-shader/hlsl: Implement tex*grad() functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-07-08 18:23:38 +02:00