panfrost: Enable 16-bit support on Bifrost

Remove the PAN_MESA_DEBUG=fp16 flag that was hiding it.

Skip two buggy dEQP tests. See linked discussion. We'll need to make
sure this gets sorted out before submitting conformance, but I don't see
a test with a fix in the pipeline as valid reason to hold back valid
code.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>
This commit is contained in:
Alyssa Rosenzweig 2021-04-09 15:44:34 -04:00 committed by Marge Bot
parent 793d18b79b
commit d4d3328b95
3 changed files with 16 additions and 7 deletions

View File

@ -16,3 +16,10 @@ dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36
# Some compute jobs take more 0.5s, the maximum allowed by the
# kernel driver
dEQP-GLES31.functional.draw_indirect.compute_interop.large.*
# Numerical instability causes failures with FP16. Forcing highp in the GLSL
# compiler is one workaround, but these tests are suspected to be buggy with a
# fix pending upstream. See
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10394
dEQP-GLES3.functional.shaders.matrix.inverse.dynamic.mediump_mat2_float_vertex
dEQP-GLES3.functional.shaders.matrix.inverse.dynamic.lowp_mat2_float_vertex

View File

@ -63,7 +63,6 @@ static const struct debug_named_value panfrost_debug_options[] = {
{"deqp", PAN_DBG_DEQP, "Hacks for dEQP"},
{"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"},
{"gl3", PAN_DBG_GL3, "Enable experimental GL 3.x implementation, up to 3.3"},
{"noafbc", PAN_DBG_NO_AFBC, "Disable AFBC support"},
@ -322,7 +321,6 @@ 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;
if (shader != PIPE_SHADER_VERTEX &&
@ -379,13 +377,18 @@ panfrost_get_shader_param(struct pipe_screen *screen,
case PIPE_SHADER_CAP_INTEGERS:
return 1;
/* The Bifrost compiler supports full 16-bit. Midgard could but int16
* support is untested, so restrict INT16 to Bifrost. Midgard
* architecturally cannot support fp16 derivatives. */
case PIPE_SHADER_CAP_FP16:
case PIPE_SHADER_CAP_GLSL_16BIT_CONSTS:
return (!is_nofp16 && !pan_is_bifrost(dev)) || is_fp16;
return !is_nofp16;
case PIPE_SHADER_CAP_FP16_DERIVATIVES:
case PIPE_SHADER_CAP_FP16_CONST_BUFFERS:
case PIPE_SHADER_CAP_INT16:
case PIPE_SHADER_CAP_FP16_CONST_BUFFERS:
return pan_is_bifrost(dev) && !is_nofp16;
case PIPE_SHADER_CAP_INT64_ATOMICS:
case PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED:
case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED:

View File

@ -38,7 +38,6 @@
#define PAN_DBG_NO_CRC 0x0080
#define PAN_DBG_GL3 0x0100
#define PAN_DBG_NO_AFBC 0x0200
#define PAN_DBG_FP16 0x0400
#define PAN_DBG_MSAA16 0x0800
#define PAN_DBG_MSAA16 0x0400
#endif /* PAN_UTIL_H */