mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Use reg_size as component count when allocating a single register.
Otherwise, for instance, the added test results in: debug_hlsl_writemask: Assertion `!(writemask & ~VKD3DSP_WRITEMASK_ALL)' failed. Which happens in allocate_variable_temp_register() when the variable's type reg_size is <= 4 but its component count is larger, which may happen if it contains objects.
This commit is contained in:
committed by
Alexandre Julliard
parent
90e6e418a3
commit
f21693b284
Notes:
Alexandre Julliard
2022-11-10 22:56:31 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/42
@@ -118,3 +118,28 @@ float4 main() : sv_target
|
||||
{
|
||||
return tex[n].Load(0);
|
||||
}
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
Texture2D tex;
|
||||
uniform float f;
|
||||
|
||||
struct apple
|
||||
{
|
||||
Texture2D tex1;
|
||||
Texture2D tex2;
|
||||
float3 aa;
|
||||
};
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
struct apple a = {tex, tex, 1.0, 2.0, 3.0};
|
||||
|
||||
a.aa += f;
|
||||
return a.aa.xyzx;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float 10.0
|
||||
todo draw quad
|
||||
todo probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0)
|
||||
|
Reference in New Issue
Block a user