vkd3d-shader/hlsl: Always specify resource on intrinsic_tex().

Otherwise, in the added test, we get:

vkd3d-compiler: vkd3d-shader/hlsl.c:452: hlsl_init_deref_from_index_chain: Assertion `chain' failed.

because on the path that triggers the following error:

E5002: Wrong type for argument 1 of 'tex3D': expected 'sampler' or 'sampler3D', but got 'sampler2D'.

a NULL params.resource is passed to hlsl_new_resource_load() and
then to hlsl_init_deref_from_index_chain().
This commit is contained in:
Francisco Casas
2023-04-26 14:42:17 -04:00
committed by Alexandre Julliard
parent 5d735f3b0e
commit abb207fab0
Notes: Alexandre Julliard 2023-05-01 22:25:34 +02: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/183
2 changed files with 10 additions and 4 deletions

View File

@@ -45,3 +45,12 @@ float4 main() : sv_target
[test]
draw quad
probe all rgba (0.25, 0, 0.25, 0)
[pixel shader fail]
sampler2D s;
float4 main() : sv_target
{
return tex3D(s, float3(0.0, 0.0, 0.0));
}