d3d12: Don't memcmp gs/tcs keys

This is unnecessary and incomplete. Not only is it covered by the hash
map lookup, but also does not consider the other key members.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21527>
This commit is contained in:
Giancarlo Devich 2023-02-24 13:26:46 -08:00 committed by Marge Bot
parent 30883c0145
commit 41d5e76f2c

View file

@ -677,10 +677,6 @@ validate_geometry_shader_variant(struct d3d12_selection_context *sel_ctx)
vs->initial->info.outputs_written, false);
}
/* Check if the currently bound geometry shader variant is correct */
if (gs && memcmp(&gs->gs_key, &key, sizeof(key)) == 0)
return;
/* Find/create the proper variant and bind it */
gs = variant_needed ? d3d12_get_gs_variant(ctx, &key) : NULL;
ctx->gfx_stages[PIPE_SHADER_GEOMETRY] = gs;
@ -709,10 +705,6 @@ validate_tess_ctrl_shader_variant(struct d3d12_selection_context *sel_ctx)
key.vertices_out = ctx->patch_vertices;
}
/* Check if the currently bound tessellation control shader variant is correct */
if (tcs && memcmp(&tcs->tcs_key, &key, sizeof(key)) == 0)
return;
/* Find/create the proper variant and bind it */
tcs = variant_needed ? d3d12_get_tcs_variant(ctx, &key) : NULL;
ctx->gfx_stages[PIPE_SHADER_TESS_CTRL] = tcs;