panfrost: Enable NIR lowering of half float packing

The GLSL lowering of half float packing involves software conversion
to half-float; instead, use the lowering in NIR.

Both Midgard and Bifrost are already set to lower the instructions to
bit operations, but change mdg_should_scalarize so that the lowerable
split variants of the pack/unpack instructions are generated.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16175>
This commit is contained in:
Icecream95
2022-04-27 08:23:35 +12:00
parent 2d7b5bd3b9
commit 1a4dca989c
2 changed files with 3 additions and 0 deletions
@@ -122,6 +122,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES:
case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
case PIPE_CAP_SHADER_PACK_HALF_FLOAT:
return 1;
case PIPE_CAP_MAX_RENDER_TARGETS:
+2
View File
@@ -294,6 +294,8 @@ mdg_should_scalarize(const nir_instr *instr, const void *_unused)
case nir_op_fdot2:
case nir_op_umul_high:
case nir_op_imul_high:
case nir_op_pack_half_2x16:
case nir_op_unpack_half_2x16:
return true;
default:
return false;