unpack intrinsic name/return type;
Hi I saw the SM6.6 pack/unpack spec says that the unpacked intrinsic name and return type are:
"
%vec4.i16 = type { i16, i16, i16, i16 }
..
// unpack x0
%x0 = call %vec4.i16 @dx.unpack_u8s16(i32
Compiling a simple shader below using dxc-artifacts" struct VertexIN { int8_t4_packed src : POSITION; }; struct VertexOUT { int16_t4 unpacked : UNPACKED; }; VertexOUT main(VertexIN IN) { VertexOUT output; output.unpacked = unpack_s8s16(IN.src); return output; }
gives me :" %dx.types.fouri16 = type { i16, i16, i16, i16 } define void @main() { %1 = call i32 @dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; %2 = call %dx.types.fouri16 @dx.op.unpack4x8.i16(i32 219, i8 1, i32 %1) ; Unpack4x8(unpackMode,pk) " notice the return type is struct vs vector, also the intrinsic name seems inconsistent.. any idea?
best
@tex3d - can you investigate and help out @kevin4QC if you can. If this is a spec issue then we'll need to triage fixing that.
This is a minor spec issue in the DXIL Backend Example. DXIL already had a struct for representing four i16 values, so that would be the one it uses. I updated the spec with the correct name.