12 Commits

Author SHA1 Message Date
3ead8d532b vkd3d-shader/hlsl: Allow non-constant deref propagation on SM1.
Note that we still have to preempt the propagation to SM1 pixel shader
uniforms. Otherwise this will turn the many constant derefs that appear
from the <index-val> copy generated in lower_index_loads() into a single
non-constant deref, causing it to allocate all the registers instead of
up until the last one used.
2025-04-02 18:27:16 +02:00
2327f87e37 tests/hlsl: Test SM1 vertex shader uniform allocation on indirect addressing.
Here, a vertex shader version of the previous test by Shaun is
introduced. Note that in this case the uniform allocates all 4 registers
instead of 3 because it is indirectly addressed.
2025-04-02 18:06:48 +02:00
1b03676a36 tests/hlsl: Add dynamic addressing copy-propagation tests. 2025-03-12 18:22:01 +01:00
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
d3ba810c98 tests: Stop probing all pixels when drawing a uniform colour.
This is simply unnecessary and wastes time.

As part of this, simply remove the "all" directive. Only for a couple of tests
is it even potentially interesting to validate all pixels (e.g.
nointerpolation.shader_test), and for those "all" is replaced with an explicit
(0, 0, 640, 480) rect.

In all other cases we just probe (0, 0).
2024-06-13 23:55:31 +02:00
28d267b7c0 vkd3d-shader/hlsl: Allocate SM1 numeric uniforms in decreasing bind count. 2024-05-13 22:26:21 +02:00
f548644222 vkd3d-shader/hlsl: Only allocate numeric bind count for SM1 numeric uniforms.
Unless they have register reservations, in which case the whole
variable is still reserved.
2024-05-13 22:26:08 +02:00
657e460d11 vkd3d-shader/hlsl: Allocate unused variables with register reservations on SM1. 2024-05-13 22:26:03 +02:00
7b3644d9f2 tests: Test SM1 const register allocation with relative addressing. 2024-05-13 22:26:03 +02:00
b56ae0f1c8 tests: Test SM1 constant register allocation with reservations. 2024-05-13 22:26:03 +02:00
9dcb74341f tests: Test SM1 constant register allocation with a row_major matrix.
Co-authored-by: Francisco Casas <fcasas@codeweavers.com>
2024-05-13 22:26:01 +02:00
7debe25a8b tests: Test SM1 constant register allocation. 2024-05-13 22:26:01 +02:00