From b11cb4168816f1e5810a722a7a6eed2bbfeffdfd Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 9 Oct 2020 10:44:21 -0400 Subject: [PATCH] panfrost: Temporarily disable FP16 on Bifrost There are some missing bits for FP16 to work on more complicated Bifrost tests. Towards conformance let's disable FP16 on Bifrost and reenable when these issues are sorted (principally, swizzle lowering). Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 4 +++- src/panfrost/lib/pan_util.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index c0501ee0a3f..3f0ca8a060f 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -62,6 +62,7 @@ static const struct debug_named_value debug_options[] = { {"afbc", PAN_DBG_AFBC, "Enable AFBC buffer sharing"}, {"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 16-bit support"}, {"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"}, @@ -284,6 +285,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; @@ -343,7 +345,7 @@ panfrost_get_shader_param(struct pipe_screen *screen, case PIPE_SHADER_CAP_FP16: case PIPE_SHADER_CAP_GLSL_16BIT_CONSTS: - return !is_nofp16; + return (!is_nofp16 && !is_bifrost) || is_fp16; case PIPE_SHADER_CAP_FP16_DERIVATIVES: case PIPE_SHADER_CAP_INT16: diff --git a/src/panfrost/lib/pan_util.h b/src/panfrost/lib/pan_util.h index 740cc26abd0..c44808e762e 100644 --- a/src/panfrost/lib/pan_util.h +++ b/src/panfrost/lib/pan_util.h @@ -38,5 +38,6 @@ #define PAN_DBG_BIFROST 0x0080 #define PAN_DBG_GL3 0x0100 #define PAN_DBG_NO_AFBC 0x0200 +#define PAN_DBG_FP16 0x0400 #endif /* PAN_UTIL_H */