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:
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user