mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Test register reservations on unused variables.
This commit is contained in:
parent
48ff7de8ef
commit
2179c79c91
Notes:
Henri Verbeet
2024-07-08 18:19:36 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/912
@ -10,6 +10,39 @@ float4 main() : sv_target
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader todo(sm<4)]
|
||||||
|
// Overlapping reservations when both variables are unused.
|
||||||
|
float4 a : register(c3);
|
||||||
|
float4 b : register(c3);
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return 42;
|
||||||
|
}
|
||||||
|
|
||||||
|
[pixel shader fail(sm>=4 & sm<6) todo(sm<4)]
|
||||||
|
// Overlapping reservations when only one variable is used.
|
||||||
|
float4 a : register(c3);
|
||||||
|
float4 b : register(c3);
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader fail(sm>=4 & sm<6) todo(sm<4)]
|
||||||
|
// Overlapping reservations when both variables are used, but their bind_count (used size) doesn't
|
||||||
|
// cause an overlap.
|
||||||
|
float4 a[2] : register(c3); // bind count: 1
|
||||||
|
float4 b : register(c4);
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
return a[0] + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[pixel shader]
|
[pixel shader]
|
||||||
// It is not required to provide a register(cX) for all elements in the $Globals buffer.
|
// It is not required to provide a register(cX) for all elements in the $Globals buffer.
|
||||||
float4 a; // will get register(c1)
|
float4 a; // will get register(c1)
|
||||||
|
Loading…
Reference in New Issue
Block a user