From 2e61c87e90736322e64ed42c45ede42d01c2b845 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 22 Oct 2024 08:56:51 -0400 Subject: [PATCH] asahi: fix no16 flag regressed when shuffling code for hk. Fixes: 3cb8c1de819 ("asahi: get debug in common") Signed-off-by: Alyssa Rosenzweig Part-of: (cherry picked from commit 773dd89fded1341fc89b8fae8dbf093e2e453827) --- .pick_status.json | 2 +- src/gallium/drivers/asahi/agx_pipe.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 11ac67ff93a..935ddc65aeb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -344,7 +344,7 @@ "description": "asahi: fix no16 flag", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "3cb8c1de819105cb21bab8ab02f1fc9a14ff4863", "notes": null diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index b3b3d29850a..9d550c769aa 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -2631,10 +2631,6 @@ agx_screen_create(int fd, struct renderonly *ro, driParseConfigFiles(config->options, config->options_info, 0, "asahi", NULL, NULL, NULL, 0, NULL, 0); - /* Forward no16 flag from driconf */ - if (driQueryOptionb(config->options, "no_fp16")) - agx_screen->dev.debug |= AGX_DBG_NO16; - agx_screen->dev.fd = fd; agx_screen->dev.ro = ro; u_rwlock_init(&agx_screen->destroy_lock); @@ -2645,6 +2641,12 @@ agx_screen_create(int fd, struct renderonly *ro, return NULL; } + /* Forward no16 flag from driconf. This must happen after opening the device, + * since agx_open_device sets debug. + */ + if (driQueryOptionb(config->options, "no_fp16")) + agx_screen->dev.debug |= AGX_DBG_NO16; + screen->destroy = agx_destroy_screen; screen->get_screen_fd = agx_screen_get_fd; screen->get_name = agx_get_name;