From fa4824c1db949bfd5a4f21436c81089892c6110c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sun, 3 Mar 2019 10:10:46 -0600 Subject: [PATCH] intel/debug: Add a debug flag to force software fp64 Reviewed-by: Matt Turner Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- src/intel/common/gen_debug.c | 1 + src/intel/common/gen_debug.h | 3 ++- src/intel/compiler/brw_compiler.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/common/gen_debug.c b/src/intel/common/gen_debug.c index a978f2f5818..49af1163314 100644 --- a/src/intel/common/gen_debug.c +++ b/src/intel/common/gen_debug.c @@ -85,6 +85,7 @@ static const struct debug_control debug_control[] = { { "nohiz", DEBUG_NO_HIZ }, { "color", DEBUG_COLOR }, { "reemit", DEBUG_REEMIT }, + { "soft64", DEBUG_SOFT64 }, { NULL, 0 } }; diff --git a/src/intel/common/gen_debug.h b/src/intel/common/gen_debug.h index 72d7ca20a39..e4dabc67f8d 100644 --- a/src/intel/common/gen_debug.h +++ b/src/intel/common/gen_debug.h @@ -83,6 +83,7 @@ extern uint64_t INTEL_DEBUG; #define DEBUG_NO_HIZ (1ull << 39) #define DEBUG_COLOR (1ull << 40) #define DEBUG_REEMIT (1ull << 41) +#define DEBUG_SOFT64 (1ull << 42) /* These flags are not compatible with the disk shader cache */ #define DEBUG_DISK_CACHE_DISABLE_MASK DEBUG_SHADER_TIME @@ -90,7 +91,7 @@ extern uint64_t INTEL_DEBUG; /* These flags may affect program generation */ #define DEBUG_DISK_CACHE_MASK \ (DEBUG_NO16 | DEBUG_NO_DUAL_OBJECT_GS | DEBUG_NO8 | DEBUG_SPILL_FS | \ - DEBUG_SPILL_VEC4 | DEBUG_NO_COMPACTION | DEBUG_DO32) + DEBUG_SPILL_VEC4 | DEBUG_NO_COMPACTION | DEBUG_DO32 | DEBUG_SOFT64) #ifdef HAVE_ANDROID_PLATFORM #define LOG_TAG "INTEL-MESA" diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c index 28793b1f0e6..4101f99d992 100644 --- a/src/intel/compiler/brw_compiler.c +++ b/src/intel/compiler/brw_compiler.c @@ -159,7 +159,7 @@ brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo) nir_lower_dround_even | nir_lower_dmod; - if (!devinfo->has_64bit_types) { + if (!devinfo->has_64bit_types || (INTEL_DEBUG & DEBUG_SOFT64)) { int64_options |= nir_lower_mov64 | nir_lower_icmp64 | nir_lower_iadd64 | -- 2.30.2