From 773dd89fded1341fc89b8fae8dbf093e2e453827 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: --- src/gallium/drivers/asahi/agx_pipe.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index d99de6866a9..cf9775dd36b 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -2673,10 +2673,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); @@ -2687,6 +2683,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; + int ret = drmSyncobjCreate(agx_device(screen)->fd, 0, &agx_screen->flush_syncobj); assert(!ret);