zink: remove unused variable in zink_instance.py

src/gallium/drivers/zink/zink_instance.c:34:9: warning: variable 'have_moltenvk_layer' set but not used [-Wunused-but-set-variable]

Fixes: 2b4fcf0a06 ("zink: generate instance creation code with a python script")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
(cherry picked from commit 5982deb48b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41269>
This commit is contained in:
Vinson Lee 2026-04-11 22:03:59 -07:00 committed by Eric Engestrom
parent 0de610dfc3
commit 9dca8146b2
2 changed files with 1 additions and 6 deletions

View file

@ -5994,7 +5994,7 @@
"description": "zink: remove unused variable in zink_instance.py",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "2b4fcf0a063f32d7000e9f4c6b8e398867d3b21c",
"notes": null

View file

@ -151,10 +151,6 @@ zink_create_instance(struct zink_screen *screen, struct zink_instance_info *inst
bool have_layer_${layer.pure_name()} = false;
%endfor
#if defined(MVK_VERSION)
bool have_moltenvk_layer = false;
#endif
GET_PROC_ADDR_INSTANCE_LOCAL(screen, NULL, EnumerateInstanceExtensionProperties);
GET_PROC_ADDR_INSTANCE_LOCAL(screen, NULL, EnumerateInstanceLayerProperties);
if (!vk_EnumerateInstanceExtensionProperties ||
@ -206,7 +202,6 @@ zink_create_instance(struct zink_screen *screen, struct zink_instance_info *inst
%endfor
#if defined(MVK_VERSION)
if (!strcmp(layer_props[i].layerName, "MoltenVK")) {
have_moltenvk_layer = true;
layers[num_layers++] = "MoltenVK";
}
#endif