mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
radv, aco, ac: Implement pack_half_2x16_rtz_split.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15838>
This commit is contained in:
parent
12652cc549
commit
c644461b71
4 changed files with 4 additions and 0 deletions
|
|
@ -3557,6 +3557,7 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
|
|||
break;
|
||||
}
|
||||
case nir_op_pack_32_4x8: bld.copy(Definition(dst), get_alu_src(ctx, instr->src[0], 4)); break;
|
||||
case nir_op_pack_half_2x16_rtz_split:
|
||||
case nir_op_pack_half_2x16_split: {
|
||||
if (dst.regClass() == v1) {
|
||||
if (ctx->program->gfx_level == GFX8 || ctx->program->gfx_level == GFX9)
|
||||
|
|
|
|||
|
|
@ -495,6 +495,7 @@ init_context(isel_context* ctx, nir_shader* shader)
|
|||
case nir_op_i2f16:
|
||||
case nir_op_i2f32:
|
||||
case nir_op_i2f64:
|
||||
case nir_op_pack_half_2x16_rtz_split:
|
||||
case nir_op_pack_half_2x16_split:
|
||||
case nir_op_pack_unorm_2x16:
|
||||
case nir_op_pack_snorm_2x16:
|
||||
|
|
|
|||
|
|
@ -1126,6 +1126,7 @@ static bool visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
|
|||
case nir_op_pack_half_2x16:
|
||||
result = emit_pack_2x16(&ctx->ac, src[0], ac_build_cvt_pkrtz_f16);
|
||||
break;
|
||||
case nir_op_pack_half_2x16_rtz_split:
|
||||
case nir_op_pack_half_2x16_split:
|
||||
src[0] = ac_to_float(&ctx->ac, src[0]);
|
||||
src[1] = ac_to_float(&ctx->ac, src[1]);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ get_nir_options_for_stage(struct radv_physical_device *device, gl_shader_stage s
|
|||
.has_dot_2x16 =
|
||||
device->rad_info.has_accelerated_dot_product && device->rad_info.gfx_level < GFX11,
|
||||
.has_find_msb_rev = true,
|
||||
.has_pack_half_2x16_rtz = true,
|
||||
.use_scoped_barrier = true,
|
||||
#ifdef LLVM_AVAILABLE
|
||||
.has_fmulz = !device->use_llvm || LLVM_VERSION_MAJOR >= 12,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue