tests/shader_runner: Support the negation of tag matches.

This commit is contained in:
Shaun Ren
2025-01-22 21:25:56 -05:00
committed by Henri Verbeet
parent 2a1e3b100b
commit 3fb241d4d6
Notes: Henri Verbeet 2025-02-03 16:40:17 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Elizabeth Figura (@zfigura)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1362

View File

@@ -187,17 +187,27 @@ static bool check_qualifier_args_conjunction(struct shader_runner *runner,
}
else
{
bool negate = false;
if (*line == '!')
{
negate = true;
++line;
}
for (unsigned int i = 0; i < ARRAY_SIZE(valid_tags); ++i)
{
const char *option_text = valid_tags[i];
size_t option_len = strlen(option_text);
bool tag_match;
if (strncmp(line, option_text, option_len))
continue;
match = true;
line += option_len;
holds &= match_tag(runner, option_text);
tag_match = match_tag(runner, option_text);
holds &= negate ? !tag_match : tag_match;
break;
}
}