d3d12: Use memcmp for full tcs/gs variant keys

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21610>
This commit is contained in:
Giancarlo Devich
2023-02-28 16:38:15 -08:00
committed by Marge Bot
parent f53188b7fa
commit cc3c8c241e
2 changed files with 2 additions and 4 deletions
@@ -465,8 +465,7 @@ hash_gs_variant_key(const void *key)
static bool
equals_gs_variant_key(const void *a, const void *b)
{
return memcmp(a, b, offsetof(d3d12_gs_variant_key, varyings)) == 0
&& d3d12_compare_varying_info(((d3d12_gs_variant_key*)a)->varyings, ((d3d12_gs_variant_key*)b)->varyings);
return memcmp(a, b, sizeof(d3d12_gs_variant_key)) == 0;
}
void
@@ -41,8 +41,7 @@ hash_tcs_variant_key(const void *key)
static bool
equals_tcs_variant_key(const void *a, const void *b)
{
return memcmp(a, b, offsetof(d3d12_tcs_variant_key, varyings)) == 0
&& d3d12_compare_varying_info(((d3d12_tcs_variant_key*)a)->varyings, ((d3d12_tcs_variant_key*)b)->varyings);
return memcmp(a, b, sizeof(d3d12_tcs_variant_key)) == 0;
}
void