From: Alyssa Rosenzweig Date: Fri, 17 Jul 2020 21:04:41 +0000 (-0400) Subject: panfrost: Enable FP16 by default X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=610af7e1accffbb77db646b0a36ecbbcaf48cece;p=mesa.git panfrost: Enable FP16 by default I see no reason to hide this. The small hit in cycle count is offset in practice by the increase in thread count. So let's ship it and get some testing. If this regresses a workload: 1. Open an issue on the tracker and attach an apitrace. 2. In the meantime set PAN_MESA_DEBUG=nofp16 to override. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index cd9b41d1d74..a5d264e0b17 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -62,7 +62,7 @@ static const struct debug_named_value debug_options[] = { {"afbc", PAN_DBG_AFBC, "Enable non-conformant AFBC impl"}, {"sync", PAN_DBG_SYNC, "Wait for each job's completion and check for any GPU fault"}, {"precompile", PAN_DBG_PRECOMPILE, "Precompile shaders for shader-db"}, - {"fp16", PAN_DBG_FP16, "Enable buggy experimental (don't use!) fp16"}, + {"nofp16", PAN_DBG_NOFP16, "Disable 16-bit support"}, {"bifrost", PAN_DBG_BIFROST, "Enable experimental Mali G31 and G52 support"}, {"gl3", PAN_DBG_GL3, "Enable experimental GL 3.x implementation, up to 3.3"}, DEBUG_NAMED_VALUE_END @@ -277,7 +277,7 @@ panfrost_get_shader_param(struct pipe_screen *screen, { struct panfrost_device *dev = pan_device(screen); bool is_deqp = dev->debug & PAN_DBG_DEQP; - bool is_fp16 = dev->debug & PAN_DBG_FP16; + bool is_nofp16 = dev->debug & PAN_DBG_NOFP16; bool is_bifrost = dev->quirks & IS_BIFROST; if (shader != PIPE_SHADER_VERTEX && @@ -335,11 +335,11 @@ panfrost_get_shader_param(struct pipe_screen *screen, return 1; case PIPE_SHADER_CAP_FP16: - return !(dev->quirks & MIDGARD_BROKEN_FP16) || is_fp16; + case PIPE_SHADER_CAP_GLSL_16BIT_TEMPS: + return !is_nofp16; case PIPE_SHADER_CAP_FP16_DERIVATIVES: case PIPE_SHADER_CAP_INT16: - case PIPE_SHADER_CAP_GLSL_16BIT_TEMPS: case PIPE_SHADER_CAP_INT64_ATOMICS: case PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED: case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED: diff --git a/src/panfrost/encoder/pan_util.h b/src/panfrost/encoder/pan_util.h index 5ca5ab6f474..5f40fc93633 100644 --- a/src/panfrost/encoder/pan_util.h +++ b/src/panfrost/encoder/pan_util.h @@ -34,7 +34,7 @@ #define PAN_DBG_AFBC 0x0008 #define PAN_DBG_SYNC 0x0010 #define PAN_DBG_PRECOMPILE 0x0020 -#define PAN_DBG_FP16 0x0040 +#define PAN_DBG_NOFP16 0x0040 #define PAN_DBG_BIFROST 0x0080 #define PAN_DBG_GL3 0x0100