vkd3d-shader/spirv: Throw compiler error on unrecognized register.

This codepath path is currently triggered when transpiling d3dbc shaders
that use vPos (or other of these special registers).

While vPos gets added to the input signature and gets assigned an INPUT
register, the registers in the shader instructions are still of
VKD3DSPR_MISCTYPE type and are not propperly mapped yet. This gives
invalid results.

Some SM1 tests must be set back to "todo" but they only work because, by
coincidence, we are assigning vPos the input register with index 0.
Propper mapping of these registers is still required.
This commit is contained in:
Francisco Casas
2024-02-29 19:32:25 -03:00
committed by Alexandre Julliard
parent 172cb75872
commit 11e7265815
Notes: Alexandre Julliard 2024-03-27 23:07:31 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/724
3 changed files with 12 additions and 11 deletions

View File

@@ -8,8 +8,8 @@ float4 main(float4 pos : sv_position) : sv_target
}
[test]
todo(glsl) draw quad
todo(sm<4) probe all rgba (1.0, 1.0, 0.0, 0.0)
todo(sm<4 | glsl) draw quad
probe all rgba (1.0, 1.0, 0.0, 0.0)
[pixel shader]
@@ -29,7 +29,7 @@ float4 main(float4 pos : sv_position) : sv_target
}
[test]
todo(glsl) draw quad
todo(sm<4 | glsl) draw quad
todo(sm<4) probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0)
todo(sm<4) probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0)
todo(sm<4) probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0)