AMDGPU / GFX Instructions GPU Native ISA AMD
2,442 instructions - showing 100 per page, page 8 of 25 - AMDGPU/GFX is AMD's native, low-level
GPU instruction set family, assembled directly with no virtual intermediate layer. Supported
instructions and their exact encodings vary by GFX compatibility target (e.g.
gfx942, gfx1100). Scalar instructions execute once per wavefront on
the Scalar ALU; vector instructions execute per-lane on the Vector ALU, gated by the EXEC mask.
| Mnemonic | Syntax | Format | GFX Targets | Unit | Summary |
|---|---|---|---|---|---|
| image_sample_b_cl_o | image_sample_b_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD bias, LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_b_o | image_sample_b_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD bias, user offsets are provided by the address registers. | ||
| image_sample_c | image_sample_c | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF are provided by the address registers. | ||
| image_sample_c_b | image_sample_c_b | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD bias are provided by the address registers. | ||
| image_sample_c_b_cl | image_sample_c_b_cl | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD bias, LOD clamp are provided by the address registers. | ||
| image_sample_c_b_cl_o | image_sample_c_b_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD bias, LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_c_b_o | image_sample_c_b_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD bias, user offsets are provided by the address registers. | ||
| image_sample_c_cd | image_sample_c_cd | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives are provided by the address registers. | ||
| image_sample_c_cd_cl | image_sample_c_cd_cl | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives, LOD clamp are provided by the address registers. | ||
| image_sample_c_cd_cl_g16 | image_sample_c_cd_cl_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives, LOD clamp, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_cd_cl_o | image_sample_c_cd_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives, LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_c_cd_cl_o_g16 | image_sample_c_cd_cl_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives, LOD clamp, user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_cd_g16 | image_sample_c_cd_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_cd_o | image_sample_c_cd_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives, user offsets are provided by the address registers. | ||
| image_sample_c_cd_o_g16 | image_sample_c_cd_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, coarse derivatives, user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_cl | image_sample_c_cl | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD clamp are provided by the address registers. | ||
| image_sample_c_cl_o | image_sample_c_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_c_d | image_sample_c_d | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, user derivatives are provided by the address registers. | ||
| image_sample_c_d_cl | image_sample_c_d_cl | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, user derivatives, LOD clamp are provided by the address registers. | ||
| image_sample_c_d_cl_g16 | image_sample_c_d_cl_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD clamp, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_d_cl_o | image_sample_c_d_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, user derivatives, LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_c_d_cl_o_g16 | image_sample_c_d_cl_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD clamp, user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_d_g16 | image_sample_c_d_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_d_o | image_sample_c_d_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, user derivatives, user offsets are provided by the address registers. | ||
| image_sample_c_d_o_g16 | image_sample_c_d_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_c_l | image_sample_c_l | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD are provided by the address registers. | ||
| image_sample_c_l_o | image_sample_c_l_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, LOD, user offsets are provided by the address registers. | ||
| image_sample_c_lz | image_sample_c_lz | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF are provided by the address registers. Mipmap level is set to zero. | ||
| image_sample_c_lz_o | image_sample_c_lz_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, user offsets are provided by the address registers. Mipmap level is set to zero. | ||
| image_sample_c_o | image_sample_c_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for PCF, user offsets are provided by the address registers. | ||
| image_sample_cd | image_sample_cd | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives are provided by the address registers. | ||
| image_sample_cd_cl | image_sample_cd_cl | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives, LOD clamp are provided by the address registers. | ||
| image_sample_cd_cl_g16 | image_sample_cd_cl_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives, LOD clamp, 16-bit derivatives are provided by the address registers. | ||
| image_sample_cd_cl_o | image_sample_cd_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives, LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_cd_cl_o_g16 | image_sample_cd_cl_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives, LOD clamp, user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_cd_g16 | image_sample_cd_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives, 16-bit derivatives are provided by the address registers. | ||
| image_sample_cd_o | image_sample_cd_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives, user offsets are provided by the address registers. | ||
| image_sample_cd_o_g16 | image_sample_cd_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for coarse derivatives, user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_cl | image_sample_cl | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD clamp are provided by the address registers. | ||
| image_sample_cl_o | image_sample_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_d | image_sample_d | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for user derivatives are provided by the address registers. | ||
| image_sample_d_cl | image_sample_d_cl | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for user derivatives, LOD clamp are provided by the address registers. | ||
| image_sample_d_cl_g16 | image_sample_d_cl_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD clamp, 16-bit derivatives are provided by the address registers. | ||
| image_sample_d_cl_o | image_sample_d_cl_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for user derivatives, LOD clamp, user offsets are provided by the address registers. | ||
| image_sample_d_cl_o_g16 | image_sample_d_cl_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD clamp, user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_d_g16 | image_sample_d_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for 16-bit derivatives are provided by the address registers. | ||
| image_sample_d_o | image_sample_d_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for user derivatives, user offsets are provided by the address registers. | ||
| image_sample_d_o_g16 | image_sample_d_o_g16 | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for user offsets, 16-bit derivatives are provided by the address registers. | ||
| image_sample_l | image_sample_l | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD are provided by the address registers. | ||
| image_sample_l_o | image_sample_l_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for LOD, user offsets are provided by the address registers. | ||
| image_sample_lz | image_sample_lz | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for are provided by the address registers. Mipmap level is set to zero. | ||
| image_sample_lz_o | image_sample_lz_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for user offsets are provided by the address registers. Mipmap level is set to zero. | ||
| image_sample_o | image_sample_o | MIMG | Sample texels from an image surface using texel coordinates provided by the address input registers and store the result into vector registers. Additional data for user offsets are provided by the address registers. | ||
| image_store | image_store | MIMG | Store a texel from a vector register to the largest miplevel in an image surface. The texel data is converted using the format conversion specified by the resource descriptor prior to storage. | ||
| image_store_by2 | image_store_by2 | MIMG | Store 2 horizontal elements from a vector register to the largest miplevel in an image surface. The texel data is converted using the format conversion specified by the resource descriptor prior to storage. Illegal for formats with more than 2 components. | ||
| image_store_by4 | image_store_by4 | MIMG | Store 4 horizontal elements from a vector register to the largest miplevel in an image surface. The texel data is converted using the format conversion specified by the resource descriptor prior to storage. Illegal for formats with more than 1 component. | ||
| image_store_mip | image_store_mip | MIMG | Store a texel from a vector register to a user-specified miplevel in an image surface. The texel data is converted using the format conversion specified by the resource descriptor prior to storage. | ||
| image_store_mip_by2 | image_store_mip_by2 | MIMG | Store 2 horizontal elements from a vector register to a user-specified miplevel in an image surface. The texel data is converted using the format conversion specified by the resource descriptor prior to storage. Illegal for formats with more than 2 components. | ||
| image_store_mip_by4 | image_store_mip_by4 | MIMG | Store 4 horizontal elements from a vector register to a user-specified miplevel in an image surface. The texel data is converted using the format conversion specified by the resource descriptor prior to storage. Illegal for formats with more than 1 component. | ||
| image_store_mip_pck | image_store_mip_pck | MIMG | Store a texel from a vector register to a user-specified miplevel in an image surface. The texel data is already packed and the format specified in the resource descriptor is ignored. | ||
| image_store_mip_pck2 | image_store_mip_pck2 | MIMG | Store 2 horizontal elements from a vector register to a user-specified miplevel in an image surface. The texel data is already packed and the format specified in the resource descriptor is ignored. Illegal for element sizes greater than 64 bits. | ||
| image_store_mip_pck4 | image_store_mip_pck4 | MIMG | Store 4 horizontal elements from a vector register to a user-specified miplevel in an image surface. The texel data is already packed and the format specified in the resource descriptor is ignored. Illegal for element sizes greater than 32 bits. | ||
| image_store_pck | image_store_pck | MIMG | Store a texel from a vector register to the largest miplevel in an image surface. The texel data is already packed and the format specified in the resource descriptor is ignored. | ||
| image_store_pck2 | image_store_pck2 | MIMG | Store 2 horizontal elements from a vector register to the largest miplevel in an image surface. The texel data is already packed and the format specified in the resource descriptor is ignored. Illegal for element sizes greater than 64 bits. | ||
| image_store_pck4 | image_store_pck4 | MIMG | Store 4 horizontal elements from a vector register to the largest miplevel in an image surface. The texel data is already packed and the format specified in the resource descriptor is ignored. Illegal for element sizes greater than 32 bits. | ||
| lds_direct_load | lds_direct_load | DSDIR | gfx1100 | Read a single 32-bit value from LDS to all lanes. A single DWORD is read from LDS memory at ADDR[M0[15:0]], where M0[15:0] is a byte address and is dword-aligned. M0[18:16] specify the data type for the read and may be 0=UBYTE, 1=USHORT, 2=DWORD, 4=SBYTE, 5=SSHORT. | |
| lds_param_load | lds_param_load | DSDIR | gfx1100 | Transfer parameter data from LDS to VGPRs and expand data in LDS using the NewPrimMask (provided in M0) to place per-quad data into lanes 0-3 of each quad… | |
| s_abs_i32 | s_abs_i32 | SOP1 | gfx1100 | Compute the absolute value of a scalar input, store the result into a scalar register and set SCC iff the result is nonzero. | |
| s_absdiff_i32 | s_absdiff_i32 | SOP2 | gfx1100 | Calculate the absolute value of difference between two scalar inputs, store the result into a scalar register and set SCC iff the result is nonzero. | |
| s_add_co_ci_u32 | s_add_co_ci_u32 | SOP2 | gfx1100 | Add two unsigned 32-bit integer inputs and a carry-in bit from SCC, store the result into a scalar register and store the carry-out bit into SCC. | |
| s_add_co_i32 | s_add_co_i32 | SOP2 | gfx1100 | Add two signed 32-bit integer inputs, store the result into a scalar register and store the carry-out bit into SCC. | |
| s_add_co_u32 | s_add_co_u32 | SOP2 | gfx1100 | Add two unsigned 32-bit integer inputs, store the result into a scalar register and store the carry-out bit into SCC. | |
| s_add_f16 | s_add_f16 | SOP2 | gfx1100 | Add two floating point inputs and store the result into a scalar register. | |
| s_add_f32 | s_add_f32 | SOP2 | gfx1100 | Add two floating point inputs and store the result into a scalar register. | |
| s_add_i32 | s_add_i32 | SOP2 | gfx1100 | Add two signed 32-bit integer inputs, store the result into a scalar register and store the carry-out bit into SCC. | |
| s_add_nc_u64 | s_add_nc_u64 | SOP2 | Add two unsigned 64-bit integer inputs and store the result into a scalar register. | ||
| s_add_pc_i64 | s_add_pc_i64 | SOP1 | Increment the PC by a signed literal offset. | ||
| s_add_u32 | s_add_u32 SDST, S0, S1 | SOP2 | gfx942, gfx1100 | Scalar ALU | Add two 32-bit unsigned scalar operands, wavefront-uniform. |
| s_add_u64 | s_add_u64 | SOP2 | AMDGPU SOP2 scalar instruction operating on u64 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| s_addc_u32 | s_addc_u32 | SOP2 | gfx1100 | Add two unsigned 32-bit integer inputs and a carry-in bit from SCC, store the result into a scalar register and store the carry-out bit into SCC. | |
| s_addk_co_i32 | s_addk_co_i32 | SOPK | gfx1100 | Add a scalar input and the sign extension of a literal 16-bit constant, store the result into a scalar register and store the carry-out bit into SCC. | |
| s_addk_i32 | s_addk_i32 | SOPK | gfx1100 | Add a scalar input and the sign extension of a literal 16-bit constant, store the result into a scalar register and store the carry-out bit into SCC. | |
| s_alloc_vgpr | s_alloc_vgpr | SOP1 | Attempt to set the wave's VGPR allocation to the specified number of VGPRs (or greater). The desired VGPR count may be specified as a constant or in an SGPR. The request is rounded up to the next block size so a successful allocation may include more than the requested number of VGPRs. | ||
| s_and_b32 | s_and_b32 | SOP2 | gfx1100 | Calculate bitwise AND on two scalar inputs, store the result into a scalar register and set SCC iff the result is nonzero. | |
| s_and_b64 | s_and_b64 | SOP2 | gfx1100 | Calculate bitwise AND on two scalar inputs, store the result into a scalar register and set SCC iff the result is nonzero. | |
| s_and_not0_saveexec_b32 | s_and_not0_saveexec_b32 | SOP1 | gfx1100 | Calculate bitwise AND on the EXEC mask and the negation of the scalar input, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_and_not0_saveexec_b64 | s_and_not0_saveexec_b64 | SOP1 | gfx1100 | Calculate bitwise AND on the EXEC mask and the negation of the scalar input, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_and_not0_wrexec_b32 | s_and_not0_wrexec_b32 | SOP1 | gfx1100 | Calculate bitwise AND on the EXEC mask and the negation of the scalar input, store the calculated result into the EXEC mask and also into the scalar destination register, and set SCC iff the calculated result is nonzero. | |
| s_and_not0_wrexec_b64 | s_and_not0_wrexec_b64 | SOP1 | gfx1100 | Calculate bitwise AND on the EXEC mask and the negation of the scalar input, store the calculated result into the EXEC mask and also into the scalar destination register, and set SCC iff the calculated result is nonzero. | |
| s_and_not1_b32 | s_and_not1_b32 | SOP2 | gfx1100 | Calculate bitwise AND with the first input and the negation of the second input, store the result into a scalar register and set SCC if the result is nonzero. | |
| s_and_not1_b64 | s_and_not1_b64 | SOP2 | gfx1100 | Calculate bitwise AND with the first input and the negation of the second input, store the result into a scalar register and set SCC if the result is nonzero. | |
| s_and_not1_saveexec_b32 | s_and_not1_saveexec_b32 | SOP1 | gfx1100 | Calculate bitwise AND on the scalar input and the negation of the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_and_not1_saveexec_b64 | s_and_not1_saveexec_b64 | SOP1 | gfx1100 | Calculate bitwise AND on the scalar input and the negation of the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_and_not1_wrexec_b32 | s_and_not1_wrexec_b32 | SOP1 | gfx1100 | Calculate bitwise AND on the scalar input and the negation of the EXEC mask, store the calculated result into the EXEC mask and also into the scalar destination register, and set SCC iff the calculated result is nonzero. | |
| s_and_not1_wrexec_b64 | s_and_not1_wrexec_b64 | SOP1 | gfx1100 | Calculate bitwise AND on the scalar input and the negation of the EXEC mask, store the calculated result into the EXEC mask and also into the scalar destination register, and set SCC iff the calculated result is nonzero. | |
| s_and_saveexec_b32 | s_and_saveexec_b32 | SOP1 | gfx1100 | Calculate bitwise AND on the scalar input and the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_and_saveexec_b64 | s_and_saveexec_b64 | SOP1 | gfx1100 | Calculate bitwise AND on the scalar input and the EXEC mask, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_andn1_saveexec_b32 | s_andn1_saveexec_b32 | SOP1 | gfx1100 | Calculate bitwise AND on the EXEC mask and the negation of the scalar input, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_andn1_saveexec_b64 | s_andn1_saveexec_b64 | SOP1 | gfx1100 | Calculate bitwise AND on the EXEC mask and the negation of the scalar input, store the calculated result into the EXEC mask, set SCC iff the calculated result is nonzero and store the original value of the EXEC mask into the scalar destination register. | |
| s_andn1_wrexec_b32 | s_andn1_wrexec_b32 | SOP1 | gfx1100 | Calculate bitwise AND on the EXEC mask and the negation of the scalar input, store the calculated result into the EXEC mask and also into the scalar destination register, and set SCC iff the calculated result is nonzero. |
Source
Instruction names, formats and GFX targets come from LLVM's AMDGPU backend. Operands, bit layouts and the instructions that backend's TableGen does not reach come from AMD's machine-readable ISA specification; descriptions and semantics from AMD's own manuals and that specification; examples from LLVM's assembler tests. Each instruction page cites the sources it uses; AMD's ROCm documentation hub is the architecture-level reference. AMD machine-readable ISA specification ↗ · AMD Instinct MI300 ISA manual ↗ · LLVM AMDGPU backend ↗ · ROCm documentation ↗