zink: use memcmp for comparing dynamic state1 info

easier to expand

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16838>
This commit is contained in:
Mike Blumenkrantz 2022-05-31 15:16:03 -04:00 committed by Marge Bot
parent b82a09fe13
commit 449b96e38d
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ struct zink_vertex_elements_state;
struct zink_pipeline_dynamic_state1 {
uint8_t front_face; //VkFrontFace:1
uint16_t num_viewports;
struct zink_depth_stencil_alpha_hw_state *depth_stencil_alpha_state;
struct zink_depth_stencil_alpha_hw_state *depth_stencil_alpha_state; //must be last
};
struct zink_gfx_pipeline_state {

View file

@ -259,7 +259,7 @@ equals_gfx_pipeline_state(const void *a, const void *b)
}
}
if (!sa->have_EXT_extended_dynamic_state) {
if (sa->dyn_state1.front_face != sb->dyn_state1.front_face)
if (memcmp(&sa->dyn_state1, &sb->dyn_state1, offsetof(struct zink_pipeline_dynamic_state1, depth_stencil_alpha_state)))
return false;
if (!!sa->dyn_state1.depth_stencil_alpha_state != !!sb->dyn_state1.depth_stencil_alpha_state ||
(sa->dyn_state1.depth_stencil_alpha_state &&