DirectX
| DXIL Opcode |
DXIL OpName |
Shader Model |
Shader Stages |
| 219 |
Unpack4x8 |
6.6 |
() |
SPIR-V
Description:
Convert unsigned width. This is either a truncate or a zero extend.
Result Type must be a scalar or vector of integer type,
whose Signedness operand is 0.
Unsigned Value must be a scalar or vector of integer
type. It must have the same number of components as Result
Type. The component width must not equal the component width in Result
Type.
Results are computed per component.
| Word Count |
Opcode |
Results |
Operands |
|
4 |
113 |
<id>
Result Type |
Result <id> |
<id>
Unsigned Value |
Test Case(s)
Example 1
//dxc unpack_u8u16_test.hlsl -T lib_6_8 -enable-16bit-types -O0
export uint16_t4 fn(uint8_t4_packed p1) {
return unpack_u8u16(p1);
}
HLSL:
Syntax
uint16_t<4> unpack_u8u16(p32u8 pk);
Type Description
Minimum Shader Model
This function is supported in the following shader models.
Shader Stages
See also
unpack_u8u16clang builtin,unpack_u8u16clang builtin withhlsl_intrinsics.hunpack_u8u16toCheckHLSLBuiltinFunctionCallinSemaChecking.cppunpack_u8u16toEmitHLSLBuiltinExprinCGBuiltin.cppclang/test/CodeGenHLSL/builtins/unpack_u8u16.hlslclang/test/SemaHLSL/BuiltIns/unpack_u8u16-errors.hlslint_dx_unpack_u8u16intrinsic inIntrinsicsDirectX.tdDXILOpMappingofint_dx_unpack_u8u16to219inDXIL.tdunpack_u8u16.llandunpack_u8u16_errors.lltests inllvm/test/CodeGen/DirectX/int_spv_unpack_u8u16intrinsic inIntrinsicsSPIRV.tdunpack_u8u16lowering and map it toint_spv_unpack_u8u16inSPIRVInstructionSelector::selectIntrinsic.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/unpack_u8u16.llDirectX
SPIR-V
OpUConvert:
Description:
Convert unsigned width. This is either a truncate or a zero extend.
Result Type must be a scalar or vector of integer type,
whose Signedness operand is 0.
Unsigned Value must be a scalar or vector of integer
type. It must have the same number of components as Result
Type. The component width must not equal the component width in Result
Type.
Results are computed per component.
4
113
<id>
Result Type
Result <id>
<id>
Unsigned Value
Test Case(s)
Example 1
HLSL:
Syntax
uint16_t<4> unpack_u8u16(p32u8 pk);Type Description
Minimum Shader Model
This function is supported in the following shader models.
Shader Stages
See also