mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
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:
parent
b82a09fe13
commit
449b96e38d
2 changed files with 2 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ struct zink_vertex_elements_state;
|
||||||
struct zink_pipeline_dynamic_state1 {
|
struct zink_pipeline_dynamic_state1 {
|
||||||
uint8_t front_face; //VkFrontFace:1
|
uint8_t front_face; //VkFrontFace:1
|
||||||
uint16_t num_viewports;
|
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 {
|
struct zink_gfx_pipeline_state {
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ equals_gfx_pipeline_state(const void *a, const void *b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!sa->have_EXT_extended_dynamic_state) {
|
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;
|
return false;
|
||||||
if (!!sa->dyn_state1.depth_stencil_alpha_state != !!sb->dyn_state1.depth_stencil_alpha_state ||
|
if (!!sa->dyn_state1.depth_stencil_alpha_state != !!sb->dyn_state1.depth_stencil_alpha_state ||
|
||||||
(sa->dyn_state1.depth_stencil_alpha_state &&
|
(sa->dyn_state1.depth_stencil_alpha_state &&
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue