From: Hyunjun Ko Date: Fri, 7 Jun 2019 08:48:34 +0000 (+0000) Subject: freedreno: Enable mediump lowering X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75674ed4d4ec868fe116df84be1366b0fcd6c942;p=mesa.git freedreno: Enable mediump lowering Reviewed-by: Alyssa Rosenzweig Reviewed-by: Kristian H. Kristensen Part-of: --- diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index e6bfa49c4a8..6c66d56dd78 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -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; diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index a83056d89d0..d6c80f2f29b 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -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;