vkd3d-shader/hlsl: Only error out on bind_count register reservation overlaps for SM1.

While on SM1 a register reservation reserves the whole size in
registers of the variable's data type, overlapping conflicts are only
checked up to the bind_count (used size) for each variable.
This commit is contained in:
Francisco Casas
2024-06-05 19:47:43 -04:00
committed by Henri Verbeet
parent 2179c79c91
commit 597e55691a
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
2 changed files with 14 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ float4 main() : sv_target
}
[pixel shader todo(sm<4)]
[pixel shader]
// Overlapping reservations when both variables are unused.
float4 a : register(c3);
float4 b : register(c3);
@@ -20,7 +20,7 @@ float4 main() : sv_target
return 42;
}
[pixel shader fail(sm>=4 & sm<6) todo(sm<4)]
[pixel shader fail(sm>=4 & sm<6)]
// Overlapping reservations when only one variable is used.
float4 a : register(c3);
float4 b : register(c3);
@@ -31,7 +31,7 @@ float4 main() : sv_target
}
[pixel shader fail(sm>=4 & sm<6) todo(sm<4)]
[pixel shader fail(sm>=4 & sm<6)]
// 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