tests/shader_runner: Introduce a new tag system.

Mostly to be able to associate a version number to each tag and
get rid of all the foo<1.2.3 tags. The new system also has fixed
tag slots, rather than dealing with strings, so we don't have to
manually adjust the size of the `tags' array.

With the new system each tag can be present or not, and if it is
present it can have an associated version number (of the form
major.minor.patch). If the version is not available, it is set to
0.0.0. Each tag can be queried for existence and for comparison
with the version number.
This commit is contained in:
Giovanni Mascellani
2025-10-03 15:26:00 +02:00
committed by Henri Verbeet
parent 41515b7047
commit cd64aa69c8
Notes: Henri Verbeet 2025-10-06 19:48:45 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1768
10 changed files with 248 additions and 180 deletions

View File

@@ -164,12 +164,35 @@ enum shader_cap
SHADER_CAP_COUNT,
};
enum shader_runner_tag
{
SHADER_RUNNER_TAG_D3D11,
SHADER_RUNNER_TAG_D3D12,
SHADER_RUNNER_TAG_GLSL,
SHADER_RUNNER_TAG_LLVM,
SHADER_RUNNER_TAG_LLVMPIPE,
SHADER_RUNNER_TAG_MESA,
SHADER_RUNNER_TAG_MSL,
SHADER_RUNNER_TAG_MVK,
SHADER_RUNNER_TAG_NVIDIA,
SHADER_RUNNER_TAG_OPENGL,
SHADER_RUNNER_TAG_VULKAN,
SHADER_RUNNER_TAG_WARP,
SHADER_RUNNER_TAG_WINDOWS,
SHADER_RUNNER_TAG_COUNT,
};
struct shader_runner_tag_value
{
bool present;
uint32_t major, minor, patch;
};
struct shader_runner_caps
{
const char *runner;
const char *compiler;
const char *tags[6];
size_t tag_count;
struct shader_runner_tag_value tags[SHADER_RUNNER_TAG_COUNT];
enum shader_model minimum_shader_model;
enum shader_model maximum_shader_model;
bool shader_caps[SHADER_CAP_COUNT];