On Wed Oct 11 12:45:51 2023 +0000, Giovanni Mascellani wrote:
commit 76843870bb94c5e6c95384c788d4842f3c7b142e Author: Nikolay Sivov <nsivov@codeweavers.com> Date: Wed Sep 20 11:53:36 2023 +0200 vkd3d-shader/hlsl: Initial support for 'switch' statement. Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Makefile.am | 1 + libs/vkd3d-shader/hlsl.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ libs/vkd3d-shader/hlsl.h | 31 ++++++++++++++++++++++++++++ libs/vkd3d-shader/hlsl.l | 4 +++- libs/vkd3d-shader/hlsl.y | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- libs/vkd3d-shader/hlsl_codegen.c | 220 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- tests/hlsl/switch.shader_test | 272 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 777 insertions(+), 12 deletions(-)
I think that can be spread in at least five different commits, the first of which would just introduce `switch.shader_test` and nothing else. I think it's ok to introduce functions as stubs because you need them for earlier commits to compile and avoid crashing, and expanding them to full implementations in later commits. The target here is to make code introduction as incremental as possible, to help reviewers understanding what's going on.
I don't necessarily agree that it applies for newly added bits, but sure if that helps. Pushed another iteration.