Module Name:    xsrc
Committed By:   mrg
Date:           Sun Sep  5 03:57:27 UTC 2021

Modified Files:
        xsrc/external/mit/MesaLib.old/dist/src/amd/common: ac_llvm_util.c
        xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/radeonsi:
            si_pipe.c

Log Message:
avoid xnack, and -fp32-denormals, and +fp64-denormals options for
amdgpu / radeonsi driver.  these options don't work with llvm 13,
and generate warnings for all GL apps.

mesa 21 has entirely different code here.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    xsrc/external/mit/MesaLib.old/dist/src/amd/common/ac_llvm_util.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
    xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/radeonsi/si_pipe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/MesaLib.old/dist/src/amd/common/ac_llvm_util.c
diff -u xsrc/external/mit/MesaLib.old/dist/src/amd/common/ac_llvm_util.c:1.1.1.1 xsrc/external/mit/MesaLib.old/dist/src/amd/common/ac_llvm_util.c:1.2
--- xsrc/external/mit/MesaLib.old/dist/src/amd/common/ac_llvm_util.c:1.1.1.1	Sun Jul 11 20:36:22 2021
+++ xsrc/external/mit/MesaLib.old/dist/src/amd/common/ac_llvm_util.c	Sun Sep  5 03:57:27 2021
@@ -151,11 +151,12 @@ static LLVMTargetMachineRef ac_create_ta
 	LLVMTargetRef target = ac_get_llvm_target(triple);
 
 	snprintf(features, sizeof(features),
-		 "+DumpCode,-fp32-denormals,+fp64-denormals%s%s%s%s%s%s",
+		 "+DumpCode%s%s%s%s%s%s%s",
+		 HAVE_LLVM >= 0x0B00 ? "" : ",-fp32-denormals,+fp64-denormals",
 		 HAVE_LLVM >= 0x0800 ? "" : ",+vgpr-spilling",
 		 tm_options & AC_TM_SISCHED ? ",+si-scheduler" : "",
-		 tm_options & AC_TM_FORCE_ENABLE_XNACK ? ",+xnack" : "",
-		 tm_options & AC_TM_FORCE_DISABLE_XNACK ? ",-xnack" : "",
+		 (tm_options & AC_TM_FORCE_ENABLE_XNACK) && HAVE_LLVM <= 0x0800 ? ",+xnack" : "",
+		 (tm_options & AC_TM_FORCE_DISABLE_XNACK) && HAVE_LLVM <= 0x0800 ? ",-xnack" : "",
 		 tm_options & AC_TM_PROMOTE_ALLOCA_TO_SCRATCH ? ",-promote-alloca" : "",
 		 tm_options & AC_TM_NO_LOAD_STORE_OPT ? ",-load-store-opt" : "");
 

Index: xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/radeonsi/si_pipe.c
diff -u xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/radeonsi/si_pipe.c:1.1.1.2 xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/radeonsi/si_pipe.c:1.2
--- xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/radeonsi/si_pipe.c:1.1.1.2	Sun Jul 11 20:36:27 2021
+++ xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/radeonsi/si_pipe.c	Sun Sep  5 03:57:27 2021
@@ -120,8 +120,8 @@ static void si_init_compiler(struct si_s
 	enum ac_target_machine_options tm_options =
 		(sscreen->debug_flags & DBG(SI_SCHED) ? AC_TM_SISCHED : 0) |
 		(sscreen->debug_flags & DBG(GISEL) ? AC_TM_ENABLE_GLOBAL_ISEL : 0) |
-		(sscreen->info.chip_class >= GFX9 ? AC_TM_FORCE_ENABLE_XNACK : 0) |
-		(sscreen->info.chip_class < GFX9 ? AC_TM_FORCE_DISABLE_XNACK : 0) |
+		(sscreen->info.chip_class >= VI ? AC_TM_FORCE_ENABLE_XNACK : 0) |
+		(sscreen->info.chip_class < VI ? AC_TM_FORCE_DISABLE_XNACK : 0) |
 		(!sscreen->llvm_has_working_vgpr_indexing ? AC_TM_PROMOTE_ALLOCA_TO_SCRATCH : 0) |
 		(sscreen->debug_flags & DBG(CHECK_IR) ? AC_TM_CHECK_IR : 0) |
 		(create_low_opt_compiler ? AC_TM_CREATE_LOW_OPT : 0);

Reply via email to