From 1211eec015f993ebe13f907f8c4cea1d9b31d61b Mon Sep 17 00:00:00 2001 From: lkcl Date: Thu, 3 Oct 2019 15:14:39 +0100 Subject: [PATCH] --- simple_v_extension/specification/ld.x.mdwn | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/simple_v_extension/specification/ld.x.mdwn b/simple_v_extension/specification/ld.x.mdwn index b4f11ee4b..96670c16e 100644 --- a/simple_v_extension/specification/ld.x.mdwn +++ b/simple_v_extension/specification/ld.x.mdwn @@ -8,8 +8,18 @@ SV is based on vectorisation of scalar opcodes. LD and ST from scalar RISCV can In addition, Vulkan requires swizzled LD/ST covering: -* constant 0, 1 -* min/max int/uint -* 1.0 and +* identity (no swizzle) +* constant 0 +* 1 or 1.0 depending on Op type * x, y, z, or w. +See + +Note that the swizzle has to be on selecting the src that will go into a sequentially indexed dest: + + for i in range(4): + srcidx = swizzle[i] + srcaddr = base + srcidx * elwidth + regs[rd+i] = mem[srcaddr] + +Swizzling on the dest would not work because xxyz would try to set the same dest twice. -- 2.30.2