Introduces an `idx_count` field to `struct vkd3d_shader_register`. Another patch set is needed for further validations and to use this field where applicable.
--
v8: vkd3d-shader/tpf: Validate input and output index ranges for default control point phases.
vkd3d-shader/tpf: Remove an unnecessary carriage return from a parser error message.
vkd3d-shader/tpf: Validate index range declarations.
vkd3d-shader/tpf: Validate input/output registers.
vkd3d-shader/tpf: Validate signature element masks.
vkd3d-shader/tpf: Validate signature element register indices.
vkd3d-shader/tpf: Validate input/output register index counts.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/198
Doing first instead of https://gitlab.winehq.org/wine/wine/-/merge_requests/2637, as it should be more straightforward.
--
v3: winemac: Use the default IME implementation for NotifyIME.
winex11: Move NotifyIME to the default IME implementation.
win32u: Introduce new NtUserNotifyIMEStatus syscall.
winex11: Simplify NotifyIME with NI_COMPOSITIONSTR / CPS_COMPLETE.
winex11: Clear the composition string when input context is closed.
winex11: Use a helper to change internal composition status.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2769
--
v4: wineoss: Use mmdevapi's AudioStreamVolume.
winecoreaudio: Use mmdevapi's AudioStreamVolume.
winealsa: Use mmdevapi's AudioStreamVolume.
winepulse: Move AudioStreamVolume into mmdevapi.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2764
Doing first instead of https://gitlab.winehq.org/wine/wine/-/merge_requests/2637, as it should be more straightforward.
--
v2: winemac: Use the default IME implementation for NotifyIME.
winex11: Move NotifyIME to the default IME implementation.
win32u: Introduce new NtUserNotifyIMEStatus syscall.
winex11: Simplify NotifyIME with NI_COMPOSITIONSTR / CPS_COMPLETE.
winex11: Clear the composition string when input context is closed.
winex11: Use a helper to change internal composition status.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2769
Prior to 98d209752cee9abd8dc31dfe1f28811066b0b83f, the base type format
wasn't inserted twice in stream format description.
An application (Idol Showdown) fails to play its intro video when the
base type format is duplicated.
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2771
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl_constant_ops.c:
> +
> + for (k = 0; k < 4; ++k)
> + {
> + switch (type)
> + {
> + case HLSL_TYPE_FLOAT:
> + case HLSL_TYPE_HALF:
> + dst->value.u[k].f = fabsf(src->value.u[k].f);
> + break;
> +
> + case HLSL_TYPE_DOUBLE:
> + dst->value.u[k].d = fabs(src->value.u[k].d);
> + break;
> +
> + case HLSL_TYPE_INT:
> + dst->value.u[k].i = abs(src->value.u[k].i);
This is undefined behavior on `INT_MIN`.
Actually, this case is somewhat interesting, because `lower_int_abs()` runs before constant expression folding, and should get rid of all `int` absolute values. So in principle we could stick `vkd3d_unreachable()` here. However `lower_int_abs()` does not run when doing constant folding from `evaluate_static_expression_as_uint()`, so this is still reachable.
I'm not sure of what the others think, but I think I would be in favor to stipulating that this is unreachable and add other passes to `evaluate_static_expression_as_uint()`.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/203#note_32259
From what I can tell, the recent work on SampleBias/SampleLevel did all of the work for us, we just need to take the same framework and include the case for the `sample_l` instruction.
Tested with some shaders from the native Linux version of Little Racers STREET.
--
v11: vkd3d-shader/tpf: For sample_l/sample_b, set lod swizzle to SCALAR.
vkd3d-shader/tpf: Add support for emitting sample_l instructions
vkd3d-shader/hlsl: Add support for SampleGrad() method
tests: Add a test for SampleGrad() method
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/188
~~This one's marked as a draft, as there seems to be a blocker with the method parameters.~~
~~The first commit totally works, _if_ the ddx/ddy parameters are literals - they do _not_ work when passing a variable of any kind. The test comes from tests/d3d12.c, so I'm mostly just trying to migrate that to the HLSL test suite, but it currently hits an assert before we get to the resource load (which does eventually work) and I'm not sure what's causing it:~~
```
vkd3d-compiler: libs/vkd3d-shader/tpf.c:3190: sm4_register_from_node: Assertion `instr->reg.allocated' failed.
```
~~Seems like it's surprised when we try to load from the constant buffer maybe?~~ Fixed!
--
v10: vkd3d-shader/hlsl: Add support for SampleGrad() method
tests: Add a test for SampleGrad() method
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/184