Commit Graph

5 Commits

Author SHA1 Message Date
Elizabeth Figura
d3ba810c98 tests: Stop probing all pixels when drawing a uniform colour.
This is simply unnecessary and wastes time.

As part of this, simply remove the "all" directive. Only for a couple of tests
is it even potentially interesting to validate all pixels (e.g.
nointerpolation.shader_test), and for those "all" is replaced with an explicit
(0, 0, 640, 480) rect.

In all other cases we just probe (0, 0).
2024-06-13 23:55:31 +02:00
Henri Verbeet
0715734dfb tests/shader_runner: Add GLSL support to the GL runner. 2024-03-19 22:57:50 +01:00
Francisco Casas
01800942a9 vkd3d-shader/hlsl: Declare vars individually when parsing struct declarations.
A struct declaration with variables is now absorbed into the 'declaration'
rule, like any other variable declaration.

A struct declaration without variables is now reduced to the
'struct_declaration_without_vars' rule.

They both are reduced to a 'declaration_statement' in the end.
2023-07-04 22:39:24 +02:00
Francisco Casas
62c891b796 vkd3d-shader/hlsl: Declare vars individually when parsing regular declarations.
In a declaration with multiple variables, the variables must be created
before the initializer of the next variable is parsed. This is required
for initializers such as:

    float a = 1, b = a, c = b + 1;

A requisite for this is that the type information is parsed in the same
rule as the first variable (as a variable_def_typed) so it is
immediately available to declare the first variable. Then, the next
untyped variable declaration is parsed, and the type from the first
variable can be used to declare the second, before the third is parsed,
and so on.
2023-07-04 22:39:21 +02:00
Francisco Casas
396edae281 tests: Test multiple variable initializers. 2023-07-04 22:39:18 +02:00