From: Alyssa Rosenzweig Date: Fri, 9 Oct 2020 14:44:21 +0000 (-0400) Subject: panfrost: Temporarily disable FP16 on Bifrost X-Git-Tag: upstream/21.0.0~4373 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b11cb4168816f1e5810a722a7a6eed2bbfeffdfd;p=platform%2Fupstream%2Fmesa.git 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: --- diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index c0501ee..3f0ca8a 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 740cc26..c44808e 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 */