Henri Verbeet pushed to branch master at wine / vkd3d
Commits: eb9e254b by Giovanni Mascellani at 2025-04-14T14:38:38+02:00 tests/shader_runner_metal: Handle multisampled 2D texture arrays properly.
They're not supported by the shader runner anyway, but there's no reason to make the code subtly wrong.
- - - - - e5bb3a52 by Feifan He at 2025-04-14T14:38:39+02:00 tests/shader_runner_metal: Introduce a helper to encode the argument buffer.
Co-authored-by: Giovanni Mascellani gmascellani@codeweavers.com
- - - - - ed677a8f by Giovanni Mascellani at 2025-04-14T14:38:39+02:00 tests/shader_runner_metal: Do not use shared buffers.
They are not supported on non-Apple discrete GPUs. Instead make them managed (if they are short lived) or private.
- - - - - 3493688a by Giovanni Mascellani at 2025-04-14T14:45:14+02:00 vkd3d-shader/msl: Access descriptors with a type-erased array.
Currently a descriptor set is represented with a structure whose fields are the various descriptors that the shader is going to use, each of them qualified with its type. This model doesn't match very well what happens with D3D12 and with Vulkan and descriptor indexing and mutable descriptors, where many descriptor of different types can overlap, and only at shader runtime it is decided which of them must be used.
Therefore with this patch a descriptor is represented as a structure whose fields carry no intrinsic typing information, but are reinterpreted according to the shader behavior on each access. For the moment there is just one field, but more will be added to account for fancier descriptor types and to workaround Metal limitations.
When completed, this design will be similar in spirit to what the Metal shader converter does, with little technical differences.
This choice has a couple of drawbacks:
1. shader debugging with Xcode is less comfortable, because the shader doesn't carry static descriptor typing information and Xcode is therefore less able to provide useful context;
2. it requires tier 2 argument buffer support and macOS version >= 13, which includes guarantees on the runtime layout for descriptors.
Supporting descriptor indexing and mutable descriptors is considered to be worthy of those drawbacks, though, is effectively required by many applications and appears to be the first goal we should aim for. If needed, in the future we might also add support for older hardware, at least for shaders that do not make use of advanced features.
- - - - - 015a751e by Feifan He at 2025-04-14T14:50:51+02:00 tests/shader_runner_metal: Add texture support.
Co-authored-by: Giovanni Mascellani gmascellani@codeweavers.com
- - - - - ba7a9a0b by Feifan He at 2025-04-14T15:27:02+02:00 vkd3d-shader/msl: Implement VKD3DSIH_LD.
Co-authored-by: Giovanni Mascellani gmascellani@codeweavers.com
- - - - -
9 changed files:
- libs/vkd3d-shader/msl.c - libs/vkd3d-shader/vkd3d_shader_private.h - tests/hlsl/cbuffer.shader_test - tests/hlsl/initializer-objects.shader_test - tests/hlsl/load-level.shader_test - tests/hlsl/object-references.shader_test - tests/hlsl/register-reservations-resources.shader_test - tests/hlsl/texture-load-typed.shader_test - tests/shader_runner_metal.m
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/cbce3a8631116ec10895e6c9c4a00...