mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Allow uninitialized static objects.
validate_static_object_references() validates that uninitialized static objects are not referenced in the shader. In case a static variable contains both numeric and object types, the "Static variables cannot have both numeric and resource components." error should preempt uninitialized numeric values to reach further compilation steps.
This commit is contained in:
parent
17d6a4411e
commit
aab9886021
Notes:
Alexandre Julliard
2023-01-19 22:45:10 +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/54
@ -2184,7 +2184,6 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
|
||||
|
||||
if (type_has_object_components(var->data_type, false))
|
||||
{
|
||||
hlsl_fixme(ctx, &var->loc, "Uninitialized static objects.");
|
||||
vkd3d_free(v);
|
||||
continue;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ size (1, 1)
|
||||
1.0 2.0 3.0 4.0
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
static Texture2D tex;
|
||||
sampler sam;
|
||||
|
||||
@ -75,7 +75,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111
|
||||
static Texture2D tex;
|
||||
|
||||
@ -113,7 +113,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
static Texture2D tex1;
|
||||
sampler sam;
|
||||
|
||||
@ -124,7 +124,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
static Texture2D tex1;
|
||||
sampler sam;
|
||||
|
||||
@ -150,7 +150,7 @@ draw quad
|
||||
probe all rgba (1, 2, 3, 4)
|
||||
|
||||
|
||||
[pixel shader todo]
|
||||
[pixel shader]
|
||||
Texture2D real_tex;
|
||||
static Texture2D tex;
|
||||
sampler sam;
|
||||
@ -162,8 +162,8 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
todo probe all rgba (1, 2, 3, 4)
|
||||
draw quad
|
||||
probe all rgba (1, 2, 3, 4)
|
||||
|
||||
|
||||
[require]
|
||||
|
Loading…
x
Reference in New Issue
Block a user