ac/llvm: fix gfx11 fs input load for 16bit varying
authorQiang Yu <yuq825@gmail.com>
Thu, 10 Nov 2022 08:44:56 +0000 (16:44 +0800)
committerEric Engestrom <eric@engestrom.ch>
Thu, 17 Nov 2022 14:05:04 +0000 (14:05 +0000)
Otherwise we get empty output.

Fixes: b07204d7804 ("radeonsi/gfx11: interp changes for 16bit")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19637>
(cherry picked from commit 88b1bb326dae2d4cc7e069849f82c08f35c407d5)

.pick_status.json
src/amd/llvm/ac_llvm_build.c

index 61cfc00..cc936aa 100644 (file)
         "description": "ac/llvm: fix gfx11 fs input load for 16bit varying",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "b07204d7804496445ddaa293ed3a2b90d170b1db"
     },
index 88c798d..60b3cf4 100644 (file)
@@ -1034,7 +1034,7 @@ LLVMValueRef ac_build_fs_interp_f16(struct ac_llvm_context *ctx, LLVMValueRef ll
       args[3] = high_16bits ? ctx->i1true : ctx->i1false;
 
       return ac_build_intrinsic(ctx, "llvm.amdgcn.interp.inreg.p2.f16",
-                                ctx->f32, args, 4, AC_FUNC_ATTR_READNONE);
+                                ctx->f16, args, 4, AC_FUNC_ATTR_READNONE);
 
    } else {
       LLVMValueRef p1;