tests: Add a test for unused overlapping cbuffer reservations.

This commit is contained in:
Victor Chiletto 2024-09-26 17:34:16 -03:00 committed by Henri Verbeet
parent 5e52ccbf3d
commit 8010ef8771
Notes: Henri Verbeet 2024-10-01 17:35:23 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1129

View File

@ -824,6 +824,29 @@ float4 main(uniform float param) : sv_target
return glob * param * a * b * c * d * e * f * g * h * i * j * k * l; return glob * param * a * b * c * d * e * f * g * h * i * j * k * l;
} }
[pixel shader todo]
// Multiple cbuffers can share the same reservation if only one of them is actually used.
cbuffer buf0 : register(b0)
{
float a;
};
cbuffer buf1 : register(b0)
{
float b;
};
float4 other_main() : sv_target
{
return a * a;
}
float4 main() : sv_target
{
return b;
}
[require] [require]
shader model >= 5.1 shader model >= 5.1