Skip to content

zink: fix `final_hash` update in `zink_gfx_program_update`

Antonino Maniscalco requested to merge antonino/mesa:hash_fix into main

Here is the long version of the explanation of what it fixes:

      if (ctx->curr_program)
         ctx->gfx_pipeline_state.final_hash ^= ctx->curr_program->last_variant_hash;

Is supposed to remove the old hash from the final hash, however the program is not necessarily replaced, it can be updated. In that case

      if (ctx->curr_program)
         ctx->gfx_pipeline_state.final_hash ^= ctx->curr_program->last_variant_hash;
      ctx->curr_program = prog; //does nothing when prog is updated
      ctx->gfx_pipeline_state.final_hash ^= ctx->curr_program->last_variant_hash;

will xor the new hash twice into final_hash leaving the old hash

Separated out of !21238 (merged)

Edited by Antonino Maniscalco

Merge request reports