zink: remove extra gfx prog unref during separable replacement

programs start with one reference per contained shader. the only other
places they can be referenced are:
* batch refs
* merged separable programs during compile

this unref did not match any of those cases and caused early deletion

caselist:
dEQP-GLES31.functional.atomic_counter.inc.8_counters_5_calls_10_threads
dEQP-GLES31.functional.texture.filtering.cube_array.combinations.linear_mipmap_linear_linear_mirror_repeat
dEQP-GLES31.functional.texture.specification.texsubimage3d_pbo.rgb32i_cube_array
dEQP-GLES31.functional.texture.specification.texsubimage3d_pbo.rgb8_image_height_cube_array
dEQP-GLES31.functional.texture.specification.texsubimage3d_depth.depth24_stencil8_cube_array
dEQP-GLES31.functional.sample_shading.min_sample_shading.multisample_texture_samples_2_color
dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_attribs_instanced_binding

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36294>
(cherry picked from commit 6570184201)
This commit is contained in:
Mike Blumenkrantz 2025-07-22 13:36:50 -04:00 committed by Eric Engestrom
parent d81e54d0b7
commit 0077c8cae7
2 changed files with 1 additions and 2 deletions

View file

@ -3554,7 +3554,7 @@
"description": "zink: remove extra gfx prog unref during separable replacement",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -750,7 +750,6 @@ zink_gfx_program_update_optimal(struct zink_context *ctx)
entry->key = real->shaders;
real->base.removed = false;
prog->base.removed = true;
zink_gfx_program_reference(screen, &prog, NULL);
prog = real;
}
update_gfx_program_optimal(ctx, prog);