--
v5: winepulse: Refactor AudioClient's Initialize to match other drivers.
wineoss: Use create_stream's channel count in AudioClient's Initialize.
winecoreaudio: Use create_stream's channel count in AudioClient's Initialize.
winealsa: Use create_stream's channel count in AudioClient's Initialize.
winepulse: Use mmdevapi's set_stream_volumes.
wineoss: Use mmdevapi's set_stream_volumes.
winecoreaudio: Use mmdevapi's set_stream_volumes.
winealsa: Use mmdevapi's set_stream_volumes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3112
This commit is part of a series of commits intended to remove all uses of hlsl_type_get_regset().
However, I think it deserves to be upstreamed sooner since it solves a rather important SM1 regression (explained below) introduced in e0031d2a1f40792ac85619a495bf5197f248b0e1 .
---
In SM1 we can expect all variables to always belong to a single regset.
structs in particular, should always be allocated to HLSL_REGSET_NUM,
since they are only allowed if all their components are numeric.
We are not covering the structs case because of the use of
hlsl_type_get_regset(), which is currently not defined for structs.
So the current shader
```hlsl
struct
{
float4 a;
float4 b;
} apple;
float4 main() : sv_target
{
return apple.a + apple.b;
}
```
fails with
```
vkd3d/libs/vkd3d-shader/hlsl.c:224: Aborting, reached unreachable code.
```
The solution is to iterate over all regsets to find the one where the
variable is allocated (if any), and ignore all others.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/236
On Fri Jun 23 06:46:32 2023 +0000, Huw Davies wrote:
> This is changing the allocator for `vols`, so you'll need commits that
> change that first.
> As this MR is already too long, let's split this into a new one and
> leave the first seven or eight commits here.
Sounds good. `malloc()` and `free()` are preferred, right?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3112#note_36613