mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-20 03:20:33 +01:00
zink: use template to eliminate more instructions in pipeline state comparison
these values don't need to be checked at all if dynamic vertex is enabled, which wouldn't previously have been possible without adding even more data to check to the pipeline state Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
This commit is contained in:
parent
d862871682
commit
c58f3ec6fc
1 changed files with 6 additions and 3 deletions
|
|
@ -267,12 +267,15 @@ equals_gfx_pipeline_state(const void *a, const void *b)
|
|||
{
|
||||
const struct zink_gfx_pipeline_state *sa = (const struct zink_gfx_pipeline_state *)a;
|
||||
const struct zink_gfx_pipeline_state *sb = (const struct zink_gfx_pipeline_state *)b;
|
||||
if (sa->uses_dynamic_stride != sb->uses_dynamic_stride)
|
||||
return false;
|
||||
if (DYNAMIC_STATE < ZINK_PIPELINE_DYNAMIC_VERTEX_INPUT) {
|
||||
if (sa->uses_dynamic_stride != sb->uses_dynamic_stride)
|
||||
return false;
|
||||
}
|
||||
/* dynamic vs rp */
|
||||
if (!!sa->render_pass != !!sb->render_pass)
|
||||
return false;
|
||||
if (DYNAMIC_STATE == ZINK_PIPELINE_NO_DYNAMIC_STATE || !sa->uses_dynamic_stride) {
|
||||
if (DYNAMIC_STATE == ZINK_PIPELINE_NO_DYNAMIC_STATE ||
|
||||
(DYNAMIC_STATE < ZINK_PIPELINE_DYNAMIC_VERTEX_INPUT && !sa->uses_dynamic_stride)) {
|
||||
if (sa->vertex_buffers_enabled_mask != sb->vertex_buffers_enabled_mask)
|
||||
return false;
|
||||
/* if we don't have dynamic states, we have to hash the enabled vertex buffer bindings */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue