> +% For now, these tests are just to check proper parsing of effects syntax.
> +% Most of these tests are useless as effects.
This file is very large; I'd propose splitting it into state-block-syntax (which already exists) and something more like effect-state and effect-shaders?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65839
> This is required before introducing the upcoming tests because otherwise
> we reach unreacheable code when new_offset_instr_from_deref() calls
> type_get_regset() on pixel or vertex shaders.
Why are we creating offset instrs for objects?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739#note_65838
I am still working on parsing the remaining features of the effects framework, such as the FX functions for the state block entries -- such as SetBlendState() -- and the "compile" and "Compileshader()" syntax. However, after adding the many tests included in 2/7 and reading the feedback from !708, I think that this first batch of patches are going in the right direction in terms of parsing the state blocks and how to represent them internally.
As Nikolay mentioned in https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/708#note_64421 and https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/708#note_64444 there are many types of state blocks entries, which should be identified for writing the effect metadata.
A part that may cause discussion on this series is that I kept the representation of `struct hlsl_state_block_entry` using a `hlsl_block` to keep it general enough to represent all these types of state block entries, thinking on later implementing a helper to identify which type of entry we are dealing with.
Even though, as Nikolay pointed out, the instruction set of fx shaders is different, I still think that HLSL IR should be enough to represent the rhs of state blocks, and hopefully we won't need to pollute it too much (apart from the introduction of hlsl_ir_undeclared_load in 4/7 to avoid creating a new variable) if we find operations that are fx-specific, since I intend to represent calls to FX functions with the same `struct hlsl_state_block_entry`, given that they cannot be called in regular HLSL code. There are many validations that are applied on regular HLSL that still should be applied to state blocks, such as the use of valid swizzles and the correct use of operators.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739
Currently we are assuming that unknown identifiers within state blocks are scalar integers. This proposal keeps doing this.
The lower_static_constant_folding() meta-pass is introduced to fold as much as possible these state state block expressions. And I plan to reuse it for constant buffer default values.
A lower_state_block_identifier_loads() pass is included in the last commit. The idea is to start filling a table with numeric values for the unknown identifiers as we start discovering them.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/708
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: include: Remove XMLSchemaCache60 from msxml2.idl.
msxml/tests: Move version-specific schema tests to corresponding modules.
msxml/tests: Move some of the validation tests to their modules.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5387