mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
ac/llvm: fix 16-bit fmed3 on GFX8 and older gens
16-bit med3 is only supported on GFX9+. Fixes dEQP-VK.spirv_assembly.instruction.amd_trinary_minmax.mid3.f16.*. Fixes:d6a07732c9("ac: use llvm.amdgcn.fmed3 intrinsic for nir_op_fmed3") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3962> (cherry picked from commit30ac733680)
This commit is contained in:
parent
d0bfb09c67
commit
016b1e27b8
2 changed files with 5 additions and 3 deletions
|
|
@ -3271,7 +3271,7 @@
|
|||
"description": "ac/llvm: fix 16-bit fmed3 on GFX8 and older gens",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "d6a07732c9c155c73f7d2cddc10faa7eab768df9"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2700,8 +2700,10 @@ LLVMValueRef ac_build_fmed3(struct ac_llvm_context *ctx, LLVMValueRef src0,
|
|||
{
|
||||
LLVMValueRef result;
|
||||
|
||||
if (bitsize == 64) {
|
||||
/* Lower 64-bit fmed because LLVM doesn't expose an intrinsic. */
|
||||
if (bitsize == 64 || (bitsize == 16 && ctx->chip_class <= GFX8)) {
|
||||
/* Lower 64-bit fmed because LLVM doesn't expose an intrinsic,
|
||||
* or lower 16-bit fmed because it's only supported on GFX9+.
|
||||
*/
|
||||
LLVMValueRef min1, min2, max1;
|
||||
|
||||
min1 = ac_build_fmin(ctx, src0, src1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue