freedreno: Enable mediump lowering

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3885>
This commit is contained in:
Hyunjun Ko
2019-06-07 08:48:34 +00:00
committed by Marge Bot
parent cc09745714
commit 75674ed4d4
2 changed files with 4 additions and 2 deletions
@@ -92,6 +92,7 @@ static const struct debug_named_value debug_options[] = {
{"nolrz", FD_DBG_NOLRZ, "Disable LRZ (a6xx)"},
{"notile", FD_DBG_NOTILE, "Disable tiling for all internal buffers"},
{"layout", FD_DBG_LAYOUT, "Dump resource layouts"},
{"nofp16", FD_DBG_NOFP16, "Disable mediump precision lowering"},
DEBUG_NAMED_VALUE_END
};
@@ -564,7 +565,8 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen,
case PIPE_SHADER_CAP_INT64_ATOMICS:
return 0;
case PIPE_SHADER_CAP_FP16:
return 0;
return ((is_a5xx(screen) || is_a6xx(screen)) &&
!(fd_mesa_debug & FD_DBG_NOFP16));
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
return 16;
@@ -89,7 +89,7 @@ enum fd_debug_flag {
FD_DBG_NOLRZ = BITFIELD_BIT(24),
FD_DBG_NOTILE = BITFIELD_BIT(25),
FD_DBG_LAYOUT = BITFIELD_BIT(26),
FD_DBG_NOFP16 = BITFIELD_BIT(27),
};
extern int fd_mesa_debug;