diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp index 5ebf49b7d71..5d5055db1d9 100644 --- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp +++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp @@ -803,18 +803,13 @@ d3d12_compare_shader_keys(struct d3d12_selection_context* sel_ctx, const d3d12_s default: unreachable("invalid stage"); } - - if (expect->input_clip_size != have->input_clip_size) + + + if (memcmp(&expect->next_varying_inputs, + &have->next_varying_inputs, + offsetof(d3d12_shader_key, vs) - offsetof(d3d12_shader_key, next_varying_inputs)) != 0) return false; - - if (expect->tex_saturate_s != have->tex_saturate_s || - expect->tex_saturate_r != have->tex_saturate_r || - expect->tex_saturate_t != have->tex_saturate_t) - return false; - - if (expect->samples_int_textures != have->samples_int_textures) - return false; - + if (expect->n_texture_states != have->n_texture_states) return false; @@ -837,21 +832,15 @@ d3d12_compare_shader_keys(struct d3d12_selection_context* sel_ctx, const d3d12_s expect->n_images * sizeof(struct d3d12_image_format_conversion_info))) return false; - if (expect->invert_depth != have->invert_depth || - expect->halfz != have->halfz) - return false; - /* Because we only add varyings we check that a shader has at least the expected in- * and outputs. */ if (!d3d12_compare_varying_info(expect->required_varying_inputs, - have->required_varying_inputs) || - expect->next_varying_inputs != have->next_varying_inputs) + have->required_varying_inputs)) return false; if (!d3d12_compare_varying_info(expect->required_varying_outputs, - have->required_varying_outputs) || - expect->prev_varying_outputs != have->prev_varying_outputs) + have->required_varying_outputs)) return false; return true;