Struct rspirv::dr::Builder[][src]

pub struct Builder { /* fields omitted */ }
Expand description

The data representation builder.

Constructs a Module by aggregating results from method calls for various instructions.

This builder is designed to be low level; its build methods’ signatures basically reflects the layout of the corresponding SPIR-V instructions faithfully.

If a SPIR-V instruction generates a result id and the result id can be forward referenced, the build method will take an optional result_id parameter. Filling it with Some(val) will instruct the builder to use the given val as the result id. For other cases, an unused result id will be automatically assigned from the builder.

So for instructions forward referencing an id, to avoid id collision, you can either

  • first append the target instruction generating that id and then append the forward referencing instruction; or
  • use the id() method to get an unused id from the builder, use it in the forward referencing instruction, and then later fill the optional result_id parameter of the target instruction with the same id.

Instructions belonging to the module (e.g., OpDecorate) can be appended at any time, no matter that a block is currently under construction or not. Intructions that can appear both in the module and block (e.g., OpVariable) will be inserted to the current block under construction first, if any.

Errors

Methods in the builder implement little sanity check; only appending instructions that violates the module structure is guarded. So methods possibly returning errors are basically those related to function and block construction (e.g., OpFunction and OpLabel).

Errors returned are enumerants related to function structure from the Error enum.

Examples

use rspirv::binary::Disassemble;

fn main() {
    let mut b = rspirv::dr::Builder::new();
    b.set_version(1, 0);
    b.memory_model(spirv::AddressingModel::Logical, spirv::MemoryModel::Simple);
    let void = b.type_void();
    let voidf = b.type_function(void, vec![void]);
    b.begin_function(void,
                     None,
                     (spirv::FunctionControl::DONT_INLINE |
                      spirv::FunctionControl::CONST),
                     voidf)
     .unwrap();
    b.begin_block(None).unwrap();
    b.ret().unwrap();
    b.end_function().unwrap();

    assert_eq!(b.module().disassemble(),
               "; SPIR-V\n\
                ; Version: 1.0\n\
                ; Generator: rspirv\n\
                ; Bound: 5\n\
                OpMemoryModel Logical Simple\n\
                %1 = OpTypeVoid\n\
                %2 = OpTypeFunction %1 %1\n\
                %3 = OpFunction  %1  DontInline|Const %2\n\
                %4 = OpLabel\n\
                OpReturn\n\
                OpFunctionEnd");
}

Implementations

Creates a new empty builder.

Create a new builder from an existing module

Sets the SPIR-V version to the given major.minor version.

If this method is not called, the generated SPIR-V will be set as the newest version supported.

Get the SPIR-V version as a (major, minor) tuple

Returns the Module under construction.

Returns the Module under construction as a reference. Note that header.bound will be inaccurate.

Returns the Module under construction as a mutable reference. Note that header.bound will be inaccurate.

Returns the next unused id.

Insert a OpType instruction, deduplicate it if needed and either return the existing ID or a new unused ID if we can’t find find the instruction already. Useful to uphold the SPIR-V rule that non-aggregate types can’t be duplicates.

Find all blocks that end in OpReturn

Select a function to insert instructions into by name

Select a function to insert instructions into by index (indexed into self.module.functions), or unselect if None

Select a basic block (by index) to insert instructions into, indexed off of self.modules.functions[self.selected_function].blocks[idx], or unselect if None

Begins building of a new function.

If function_id is Some(val), then val will be used as the result id of the function under construction; otherwise, an unused result id will be automatically assigned.

Ends building of the current function.

Declares a formal parameter for the current function.

Begins building of a new block.

If label_id is Some(val), then val will be used as the result id for the OpLabel instruction begining this block; otherwise, a unused result id will be automatically assigned.

Begins building of a new block.

Counter to begin_block that always generates a new OpLabel at the beginning of a block - in some cases this is undesirable (such as when constructing a branch).

Appends an OpCapability instruction.

Appends an OpExtension instruction.

Appends an OpExtInstImport instruction and returns the result id.

Appends an OpMemoryModel instruction.

Appends an OpEntryPoint instruction.

Appends an OpExecutionMode instruction.

Appends an OpExecutionModeId instruction.

Appends an OpLine instruction.

If a block is currently selected, the OpLine is inserted into that block. If no block is currently selected, the OpLine is inserted into types_global_values.

Appends an OpNoLine instruction.

If a block is currently selected, the OpNoLine is inserted into that block. If no block is currently selected, the OpNoLine is inserted into types_global_values.

Appends an OpTypeVoid instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeVoid instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeBool instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeBool instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeInt instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeInt instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeFloat instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeFloat instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeVector instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeVector instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeMatrix instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeMatrix instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeImage instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeImage instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeSampler instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeSampler instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeSampledImage instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeSampledImage instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeArray instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeArray instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeRuntimeArray instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeRuntimeArray instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeStruct instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeStruct instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeFunction instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeFunction instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeEvent instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeEvent instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeDeviceEvent instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeDeviceEvent instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeReserveId instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeReserveId instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeQueue instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeQueue instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypePipe instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypePipe instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypePipeStorage instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypePipeStorage instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeNamedBarrier instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeNamedBarrier instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeRayQueryKHR instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeRayQueryKHR instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeAccelerationStructureKHR instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeAccelerationStructureKHR instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeCooperativeMatrixNV instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeCooperativeMatrixNV instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpConstantTrue instruction.

Appends an OpConstantFalse instruction.

Appends an OpConstantComposite instruction.

Appends an OpConstantSampler instruction.

Appends an OpConstantNull instruction.

Appends an OpSpecConstantTrue instruction.

Appends an OpSpecConstantFalse instruction.

Appends an OpSpecConstantComposite instruction.

Appends an OpSpecConstantOp instruction.

Appends an OpDecorate instruction.

Appends an OpMemberDecorate instruction.

Appends an OpGroupDecorate instruction.

Appends an OpGroupMemberDecorate instruction.

Appends an OpDecorateId instruction.

Appends an OpDecorateString instruction.

Appends an OpDecorateStringGOOGLE instruction.

Appends an OpMemberDecorateString instruction.

Appends an OpMemberDecorateStringGOOGLE instruction.

Appends an OpLoopMerge instruction and ends the current block.

Insert an OpLoopMerge instruction and ends the current block.

Appends an OpSelectionMerge instruction and ends the current block.

Insert an OpSelectionMerge instruction and ends the current block.

Appends an OpBranch instruction and ends the current block.

Insert an OpBranch instruction and ends the current block.

Appends an OpBranchConditional instruction and ends the current block.

Insert an OpBranchConditional instruction and ends the current block.

Appends an OpSwitch instruction and ends the current block.

Insert an OpSwitch instruction and ends the current block.

Appends an OpKill instruction and ends the current block.

Insert an OpKill instruction and ends the current block.

Appends an OpReturn instruction and ends the current block.

Insert an OpReturn instruction and ends the current block.

Appends an OpReturnValue instruction and ends the current block.

Insert an OpReturnValue instruction and ends the current block.

Appends an OpUnreachable instruction and ends the current block.

Insert an OpUnreachable instruction and ends the current block.

Appends an OpLifetimeStart instruction and ends the current block.

Insert an OpLifetimeStart instruction and ends the current block.

Appends an OpLifetimeStop instruction and ends the current block.

Insert an OpLifetimeStop instruction and ends the current block.

Appends an OpTerminateInvocation instruction and ends the current block.

Insert an OpTerminateInvocation instruction and ends the current block.

Appends an OpIgnoreIntersectionKHR instruction and ends the current block.

Insert an OpIgnoreIntersectionKHR instruction and ends the current block.

Appends an OpTerminateRayKHR instruction and ends the current block.

Insert an OpTerminateRayKHR instruction and ends the current block.

Appends an OpSourceContinued instruction.

Appends an OpSource instruction.

Appends an OpSourceExtension instruction.

Appends an OpName instruction.

Appends an OpMemberName instruction.

Appends an OpModuleProcessed instruction.

Appends an OpDecorationGroup instruction and returns the result id.

Appends an OpTypeForwardPointer instruction.

Appends an OpTypePointer instruction and returns the result id, or return the existing id if the instruction was already present.

Appends an OpTypeOpaque instruction and returns the result id.

Appends an OpConstant instruction with the given 32-bit float value. or the module if no block is under construction.

Appends an OpConstant instruction with the given 64-bit float value.

Appends an OpConstant instruction with the given 32-bit integer value. or the module if no block is under construction.

Appends an OpConstant instruction with the given 64-bit integer value.

Appends an OpSpecConstant instruction with the given 32-bit float value. or the module if no block is under construction.

Appends an OpSpecConstant instruction with the given 64-bit float value.

Appends an OpSpecConstant instruction with the given 32-bit integer value. or the module if no block is under construction.

Appends an OpSpecConstant instruction with the given 32-bit integer value.

Appends an OpVariable instruction to either the current block or the module if no block is under construction.

Appends an OpUndef instruction to either the current block or the module if no block is under construction.

Appends an OpNop instruction to the current block.

Appends an OpNop instruction to the current block.

Appends an OpFunctionCall instruction to the current block.

Appends an OpFunctionCall instruction to the current block.

Appends an OpImageTexelPointer instruction to the current block.

Appends an OpImageTexelPointer instruction to the current block.

Appends an OpLoad instruction to the current block.

Appends an OpLoad instruction to the current block.

Appends an OpStore instruction to the current block.

Appends an OpStore instruction to the current block.

Appends an OpCopyMemory instruction to the current block.

Appends an OpCopyMemory instruction to the current block.

Appends an OpCopyMemorySized instruction to the current block.

Appends an OpCopyMemorySized instruction to the current block.

Appends an OpAccessChain instruction to the current block.

Appends an OpAccessChain instruction to the current block.

Appends an OpInBoundsAccessChain instruction to the current block.

Appends an OpInBoundsAccessChain instruction to the current block.

Appends an OpPtrAccessChain instruction to the current block.

Appends an OpPtrAccessChain instruction to the current block.

Appends an OpArrayLength instruction to the current block.

Appends an OpArrayLength instruction to the current block.

Appends an OpGenericPtrMemSemantics instruction to the current block.

Appends an OpGenericPtrMemSemantics instruction to the current block.

Appends an OpInBoundsPtrAccessChain instruction to the current block.

Appends an OpInBoundsPtrAccessChain instruction to the current block.

Appends an OpVectorExtractDynamic instruction to the current block.

Appends an OpVectorExtractDynamic instruction to the current block.

Appends an OpVectorInsertDynamic instruction to the current block.

Appends an OpVectorInsertDynamic instruction to the current block.

Appends an OpVectorShuffle instruction to the current block.

Appends an OpVectorShuffle instruction to the current block.

Appends an OpCompositeConstruct instruction to the current block.

Appends an OpCompositeConstruct instruction to the current block.

Appends an OpCompositeExtract instruction to the current block.

Appends an OpCompositeExtract instruction to the current block.

Appends an OpCompositeInsert instruction to the current block.

Appends an OpCompositeInsert instruction to the current block.

Appends an OpCopyObject instruction to the current block.

Appends an OpCopyObject instruction to the current block.

Appends an OpTranspose instruction to the current block.

Appends an OpTranspose instruction to the current block.

Appends an OpSampledImage instruction to the current block.

Appends an OpSampledImage instruction to the current block.

Appends an OpImageSampleImplicitLod instruction to the current block.

Appends an OpImageSampleImplicitLod instruction to the current block.

Appends an OpImageSampleExplicitLod instruction to the current block.

Appends an OpImageSampleExplicitLod instruction to the current block.

Appends an OpImageSampleDrefImplicitLod instruction to the current block.

Appends an OpImageSampleDrefImplicitLod instruction to the current block.

Appends an OpImageSampleDrefExplicitLod instruction to the current block.

Appends an OpImageSampleDrefExplicitLod instruction to the current block.

Appends an OpImageSampleProjImplicitLod instruction to the current block.

Appends an OpImageSampleProjImplicitLod instruction to the current block.

Appends an OpImageSampleProjExplicitLod instruction to the current block.

Appends an OpImageSampleProjExplicitLod instruction to the current block.

Appends an OpImageSampleProjDrefImplicitLod instruction to the current block.

Appends an OpImageSampleProjDrefImplicitLod instruction to the current block.

Appends an OpImageSampleProjDrefExplicitLod instruction to the current block.

Appends an OpImageSampleProjDrefExplicitLod instruction to the current block.

Appends an OpImageFetch instruction to the current block.

Appends an OpImageFetch instruction to the current block.

Appends an OpImageGather instruction to the current block.

Appends an OpImageGather instruction to the current block.

Appends an OpImageDrefGather instruction to the current block.

Appends an OpImageDrefGather instruction to the current block.

Appends an OpImageRead instruction to the current block.

Appends an OpImageRead instruction to the current block.

Appends an OpImageWrite instruction to the current block.

Appends an OpImageWrite instruction to the current block.

Appends an OpImage instruction to the current block.

Appends an OpImage instruction to the current block.

Appends an OpImageQueryFormat instruction to the current block.

Appends an OpImageQueryFormat instruction to the current block.

Appends an OpImageQueryOrder instruction to the current block.

Appends an OpImageQueryOrder instruction to the current block.

Appends an OpImageQuerySizeLod instruction to the current block.

Appends an OpImageQuerySizeLod instruction to the current block.

Appends an OpImageQuerySize instruction to the current block.

Appends an OpImageQuerySize instruction to the current block.

Appends an OpImageQueryLod instruction to the current block.

Appends an OpImageQueryLod instruction to the current block.

Appends an OpImageQueryLevels instruction to the current block.

Appends an OpImageQueryLevels instruction to the current block.

Appends an OpImageQuerySamples instruction to the current block.

Appends an OpImageQuerySamples instruction to the current block.

Appends an OpConvertFToU instruction to the current block.

Appends an OpConvertFToU instruction to the current block.

Appends an OpConvertFToS instruction to the current block.

Appends an OpConvertFToS instruction to the current block.

Appends an OpConvertSToF instruction to the current block.

Appends an OpConvertSToF instruction to the current block.

Appends an OpConvertUToF instruction to the current block.

Appends an OpConvertUToF instruction to the current block.

Appends an OpUConvert instruction to the current block.

Appends an OpUConvert instruction to the current block.

Appends an OpSConvert instruction to the current block.

Appends an OpSConvert instruction to the current block.

Appends an OpFConvert instruction to the current block.

Appends an OpFConvert instruction to the current block.

Appends an OpQuantizeToF16 instruction to the current block.

Appends an OpQuantizeToF16 instruction to the current block.

Appends an OpConvertPtrToU instruction to the current block.

Appends an OpConvertPtrToU instruction to the current block.

Appends an OpSatConvertSToU instruction to the current block.

Appends an OpSatConvertSToU instruction to the current block.

Appends an OpSatConvertUToS instruction to the current block.

Appends an OpSatConvertUToS instruction to the current block.

Appends an OpConvertUToPtr instruction to the current block.

Appends an OpConvertUToPtr instruction to the current block.

Appends an OpPtrCastToGeneric instruction to the current block.

Appends an OpPtrCastToGeneric instruction to the current block.

Appends an OpGenericCastToPtr instruction to the current block.

Appends an OpGenericCastToPtr instruction to the current block.

Appends an OpGenericCastToPtrExplicit instruction to the current block.

Appends an OpGenericCastToPtrExplicit instruction to the current block.

Appends an OpBitcast instruction to the current block.

Appends an OpBitcast instruction to the current block.

Appends an OpSNegate instruction to the current block.

Appends an OpSNegate instruction to the current block.

Appends an OpFNegate instruction to the current block.

Appends an OpFNegate instruction to the current block.

Appends an OpIAdd instruction to the current block.

Appends an OpIAdd instruction to the current block.

Appends an OpFAdd instruction to the current block.

Appends an OpFAdd instruction to the current block.

Appends an OpISub instruction to the current block.

Appends an OpISub instruction to the current block.

Appends an OpFSub instruction to the current block.

Appends an OpFSub instruction to the current block.

Appends an OpIMul instruction to the current block.

Appends an OpIMul instruction to the current block.

Appends an OpFMul instruction to the current block.

Appends an OpFMul instruction to the current block.

Appends an OpUDiv instruction to the current block.

Appends an OpUDiv instruction to the current block.

Appends an OpSDiv instruction to the current block.

Appends an OpSDiv instruction to the current block.

Appends an OpFDiv instruction to the current block.

Appends an OpFDiv instruction to the current block.

Appends an OpUMod instruction to the current block.

Appends an OpUMod instruction to the current block.

Appends an OpSRem instruction to the current block.

Appends an OpSRem instruction to the current block.

Appends an OpSMod instruction to the current block.

Appends an OpSMod instruction to the current block.

Appends an OpFRem instruction to the current block.

Appends an OpFRem instruction to the current block.

Appends an OpFMod instruction to the current block.

Appends an OpFMod instruction to the current block.

Appends an OpVectorTimesScalar instruction to the current block.

Appends an OpVectorTimesScalar instruction to the current block.

Appends an OpMatrixTimesScalar instruction to the current block.

Appends an OpMatrixTimesScalar instruction to the current block.

Appends an OpVectorTimesMatrix instruction to the current block.

Appends an OpVectorTimesMatrix instruction to the current block.

Appends an OpMatrixTimesVector instruction to the current block.

Appends an OpMatrixTimesVector instruction to the current block.

Appends an OpMatrixTimesMatrix instruction to the current block.

Appends an OpMatrixTimesMatrix instruction to the current block.

Appends an OpOuterProduct instruction to the current block.

Appends an OpOuterProduct instruction to the current block.

Appends an OpDot instruction to the current block.

Appends an OpDot instruction to the current block.

Appends an OpIAddCarry instruction to the current block.

Appends an OpIAddCarry instruction to the current block.

Appends an OpISubBorrow instruction to the current block.

Appends an OpISubBorrow instruction to the current block.

Appends an OpUMulExtended instruction to the current block.

Appends an OpUMulExtended instruction to the current block.

Appends an OpSMulExtended instruction to the current block.

Appends an OpSMulExtended instruction to the current block.

Appends an OpAny instruction to the current block.

Appends an OpAny instruction to the current block.

Appends an OpAll instruction to the current block.

Appends an OpAll instruction to the current block.

Appends an OpIsNan instruction to the current block.

Appends an OpIsNan instruction to the current block.

Appends an OpIsInf instruction to the current block.

Appends an OpIsInf instruction to the current block.

Appends an OpIsFinite instruction to the current block.

Appends an OpIsFinite instruction to the current block.

Appends an OpIsNormal instruction to the current block.

Appends an OpIsNormal instruction to the current block.

Appends an OpSignBitSet instruction to the current block.

Appends an OpSignBitSet instruction to the current block.

Appends an OpLessOrGreater instruction to the current block.

Appends an OpLessOrGreater instruction to the current block.

Appends an OpOrdered instruction to the current block.

Appends an OpOrdered instruction to the current block.

Appends an OpUnordered instruction to the current block.

Appends an OpUnordered instruction to the current block.

Appends an OpLogicalEqual instruction to the current block.

Appends an OpLogicalEqual instruction to the current block.

Appends an OpLogicalNotEqual instruction to the current block.

Appends an OpLogicalNotEqual instruction to the current block.

Appends an OpLogicalOr instruction to the current block.

Appends an OpLogicalOr instruction to the current block.

Appends an OpLogicalAnd instruction to the current block.

Appends an OpLogicalAnd instruction to the current block.

Appends an OpLogicalNot instruction to the current block.

Appends an OpLogicalNot instruction to the current block.

Appends an OpSelect instruction to the current block.

Appends an OpSelect instruction to the current block.

Appends an OpIEqual instruction to the current block.

Appends an OpIEqual instruction to the current block.

Appends an OpINotEqual instruction to the current block.

Appends an OpINotEqual instruction to the current block.

Appends an OpUGreaterThan instruction to the current block.

Appends an OpUGreaterThan instruction to the current block.

Appends an OpSGreaterThan instruction to the current block.

Appends an OpSGreaterThan instruction to the current block.

Appends an OpUGreaterThanEqual instruction to the current block.

Appends an OpUGreaterThanEqual instruction to the current block.

Appends an OpSGreaterThanEqual instruction to the current block.

Appends an OpSGreaterThanEqual instruction to the current block.

Appends an OpULessThan instruction to the current block.

Appends an OpULessThan instruction to the current block.

Appends an OpSLessThan instruction to the current block.

Appends an OpSLessThan instruction to the current block.

Appends an OpULessThanEqual instruction to the current block.

Appends an OpULessThanEqual instruction to the current block.

Appends an OpSLessThanEqual instruction to the current block.

Appends an OpSLessThanEqual instruction to the current block.

Appends an OpFOrdEqual instruction to the current block.

Appends an OpFOrdEqual instruction to the current block.

Appends an OpFUnordEqual instruction to the current block.

Appends an OpFUnordEqual instruction to the current block.

Appends an OpFOrdNotEqual instruction to the current block.

Appends an OpFOrdNotEqual instruction to the current block.

Appends an OpFUnordNotEqual instruction to the current block.

Appends an OpFUnordNotEqual instruction to the current block.

Appends an OpFOrdLessThan instruction to the current block.

Appends an OpFOrdLessThan instruction to the current block.

Appends an OpFUnordLessThan instruction to the current block.

Appends an OpFUnordLessThan instruction to the current block.

Appends an OpFOrdGreaterThan instruction to the current block.

Appends an OpFOrdGreaterThan instruction to the current block.

Appends an OpFUnordGreaterThan instruction to the current block.

Appends an OpFUnordGreaterThan instruction to the current block.

Appends an OpFOrdLessThanEqual instruction to the current block.

Appends an OpFOrdLessThanEqual instruction to the current block.

Appends an OpFUnordLessThanEqual instruction to the current block.

Appends an OpFUnordLessThanEqual instruction to the current block.

Appends an OpFOrdGreaterThanEqual instruction to the current block.

Appends an OpFOrdGreaterThanEqual instruction to the current block.

Appends an OpFUnordGreaterThanEqual instruction to the current block.

Appends an OpFUnordGreaterThanEqual instruction to the current block.

Appends an OpShiftRightLogical instruction to the current block.

Appends an OpShiftRightLogical instruction to the current block.

Appends an OpShiftRightArithmetic instruction to the current block.

Appends an OpShiftRightArithmetic instruction to the current block.

Appends an OpShiftLeftLogical instruction to the current block.

Appends an OpShiftLeftLogical instruction to the current block.

Appends an OpBitwiseOr instruction to the current block.

Appends an OpBitwiseOr instruction to the current block.

Appends an OpBitwiseXor instruction to the current block.

Appends an OpBitwiseXor instruction to the current block.

Appends an OpBitwiseAnd instruction to the current block.

Appends an OpBitwiseAnd instruction to the current block.

Appends an OpNot instruction to the current block.

Appends an OpNot instruction to the current block.

Appends an OpBitFieldInsert instruction to the current block.

Appends an OpBitFieldInsert instruction to the current block.

Appends an OpBitFieldSExtract instruction to the current block.

Appends an OpBitFieldSExtract instruction to the current block.

Appends an OpBitFieldUExtract instruction to the current block.

Appends an OpBitFieldUExtract instruction to the current block.

Appends an OpBitReverse instruction to the current block.

Appends an OpBitReverse instruction to the current block.

Appends an OpBitCount instruction to the current block.

Appends an OpBitCount instruction to the current block.

Appends an OpDPdx instruction to the current block.

Appends an OpDPdx instruction to the current block.

Appends an OpDPdy instruction to the current block.

Appends an OpDPdy instruction to the current block.

Appends an OpFwidth instruction to the current block.

Appends an OpFwidth instruction to the current block.

Appends an OpDPdxFine instruction to the current block.

Appends an OpDPdxFine instruction to the current block.

Appends an OpDPdyFine instruction to the current block.

Appends an OpDPdyFine instruction to the current block.

Appends an OpFwidthFine instruction to the current block.

Appends an OpFwidthFine instruction to the current block.

Appends an OpDPdxCoarse instruction to the current block.

Appends an OpDPdxCoarse instruction to the current block.

Appends an OpDPdyCoarse instruction to the current block.

Appends an OpDPdyCoarse instruction to the current block.

Appends an OpFwidthCoarse instruction to the current block.

Appends an OpFwidthCoarse instruction to the current block.

Appends an OpEmitVertex instruction to the current block.

Appends an OpEmitVertex instruction to the current block.

Appends an OpEndPrimitive instruction to the current block.

Appends an OpEndPrimitive instruction to the current block.

Appends an OpEmitStreamVertex instruction to the current block.

Appends an OpEmitStreamVertex instruction to the current block.

Appends an OpEndStreamPrimitive instruction to the current block.

Appends an OpEndStreamPrimitive instruction to the current block.

Appends an OpControlBarrier instruction to the current block.

Appends an OpControlBarrier instruction to the current block.

Appends an OpMemoryBarrier instruction to the current block.

Appends an OpMemoryBarrier instruction to the current block.

Appends an OpAtomicLoad instruction to the current block.

Appends an OpAtomicLoad instruction to the current block.

Appends an OpAtomicStore instruction to the current block.

Appends an OpAtomicStore instruction to the current block.

Appends an OpAtomicExchange instruction to the current block.

Appends an OpAtomicExchange instruction to the current block.

Appends an OpAtomicCompareExchange instruction to the current block.

Appends an OpAtomicCompareExchange instruction to the current block.

Appends an OpAtomicCompareExchangeWeak instruction to the current block.

Appends an OpAtomicCompareExchangeWeak instruction to the current block.

Appends an OpAtomicIIncrement instruction to the current block.

Appends an OpAtomicIIncrement instruction to the current block.

Appends an OpAtomicIDecrement instruction to the current block.

Appends an OpAtomicIDecrement instruction to the current block.

Appends an OpAtomicIAdd instruction to the current block.

Appends an OpAtomicIAdd instruction to the current block.

Appends an OpAtomicISub instruction to the current block.

Appends an OpAtomicISub instruction to the current block.

Appends an OpAtomicSMin instruction to the current block.

Appends an OpAtomicSMin instruction to the current block.

Appends an OpAtomicUMin instruction to the current block.

Appends an OpAtomicUMin instruction to the current block.

Appends an OpAtomicSMax instruction to the current block.

Appends an OpAtomicSMax instruction to the current block.

Appends an OpAtomicUMax instruction to the current block.

Appends an OpAtomicUMax instruction to the current block.

Appends an OpAtomicAnd instruction to the current block.

Appends an OpAtomicAnd instruction to the current block.

Appends an OpAtomicOr instruction to the current block.

Appends an OpAtomicOr instruction to the current block.

Appends an OpAtomicXor instruction to the current block.

Appends an OpAtomicXor instruction to the current block.

Appends an OpPhi instruction to the current block.

Appends an OpPhi instruction to the current block.

Appends an OpGroupAsyncCopy instruction to the current block.

Appends an OpGroupAsyncCopy instruction to the current block.

Appends an OpGroupWaitEvents instruction to the current block.

Appends an OpGroupWaitEvents instruction to the current block.

Appends an OpGroupAll instruction to the current block.

Appends an OpGroupAll instruction to the current block.

Appends an OpGroupAny instruction to the current block.

Appends an OpGroupAny instruction to the current block.

Appends an OpGroupBroadcast instruction to the current block.

Appends an OpGroupBroadcast instruction to the current block.

Appends an OpGroupIAdd instruction to the current block.

Appends an OpGroupIAdd instruction to the current block.

Appends an OpGroupFAdd instruction to the current block.

Appends an OpGroupFAdd instruction to the current block.

Appends an OpGroupFMin instruction to the current block.

Appends an OpGroupFMin instruction to the current block.

Appends an OpGroupUMin instruction to the current block.

Appends an OpGroupUMin instruction to the current block.

Appends an OpGroupSMin instruction to the current block.

Appends an OpGroupSMin instruction to the current block.

Appends an OpGroupFMax instruction to the current block.

Appends an OpGroupFMax instruction to the current block.

Appends an OpGroupUMax instruction to the current block.

Appends an OpGroupUMax instruction to the current block.

Appends an OpGroupSMax instruction to the current block.

Appends an OpGroupSMax instruction to the current block.

Appends an OpReadPipe instruction to the current block.

Appends an OpReadPipe instruction to the current block.

Appends an OpWritePipe instruction to the current block.

Appends an OpWritePipe instruction to the current block.

Appends an OpReservedReadPipe instruction to the current block.

Appends an OpReservedReadPipe instruction to the current block.

Appends an OpReservedWritePipe instruction to the current block.

Appends an OpReservedWritePipe instruction to the current block.

Appends an OpReserveReadPipePackets instruction to the current block.

Appends an OpReserveReadPipePackets instruction to the current block.

Appends an OpReserveWritePipePackets instruction to the current block.

Appends an OpReserveWritePipePackets instruction to the current block.

Appends an OpCommitReadPipe instruction to the current block.

Appends an OpCommitReadPipe instruction to the current block.

Appends an OpCommitWritePipe instruction to the current block.

Appends an OpCommitWritePipe instruction to the current block.

Appends an OpIsValidReserveId instruction to the current block.

Appends an OpIsValidReserveId instruction to the current block.

Appends an OpGetNumPipePackets instruction to the current block.

Appends an OpGetNumPipePackets instruction to the current block.

Appends an OpGetMaxPipePackets instruction to the current block.

Appends an OpGetMaxPipePackets instruction to the current block.

Appends an OpGroupReserveReadPipePackets instruction to the current block.

Appends an OpGroupReserveReadPipePackets instruction to the current block.

Appends an OpGroupReserveWritePipePackets instruction to the current block.

Appends an OpGroupReserveWritePipePackets instruction to the current block.

Appends an OpGroupCommitReadPipe instruction to the current block.

Appends an OpGroupCommitReadPipe instruction to the current block.

Appends an OpGroupCommitWritePipe instruction to the current block.

Appends an OpGroupCommitWritePipe instruction to the current block.

Appends an OpEnqueueMarker instruction to the current block.

Appends an OpEnqueueMarker instruction to the current block.

Appends an OpEnqueueKernel instruction to the current block.

Appends an OpEnqueueKernel instruction to the current block.

Appends an OpGetKernelNDrangeSubGroupCount instruction to the current block.

Appends an OpGetKernelNDrangeSubGroupCount instruction to the current block.

Appends an OpGetKernelNDrangeMaxSubGroupSize instruction to the current block.

Appends an OpGetKernelNDrangeMaxSubGroupSize instruction to the current block.

Appends an OpGetKernelWorkGroupSize instruction to the current block.

Appends an OpGetKernelWorkGroupSize instruction to the current block.

Appends an OpGetKernelPreferredWorkGroupSizeMultiple instruction to the current block.

Appends an OpGetKernelPreferredWorkGroupSizeMultiple instruction to the current block.

Appends an OpRetainEvent instruction to the current block.

Appends an OpRetainEvent instruction to the current block.

Appends an OpReleaseEvent instruction to the current block.

Appends an OpReleaseEvent instruction to the current block.

Appends an OpCreateUserEvent instruction to the current block.

Appends an OpCreateUserEvent instruction to the current block.

Appends an OpIsValidEvent instruction to the current block.

Appends an OpIsValidEvent instruction to the current block.

Appends an OpSetUserEventStatus instruction to the current block.

Appends an OpSetUserEventStatus instruction to the current block.

Appends an OpCaptureEventProfilingInfo instruction to the current block.

Appends an OpCaptureEventProfilingInfo instruction to the current block.

Appends an OpGetDefaultQueue instruction to the current block.

Appends an OpGetDefaultQueue instruction to the current block.

Appends an OpBuildNDRange instruction to the current block.

Appends an OpBuildNDRange instruction to the current block.

Appends an OpImageSparseSampleImplicitLod instruction to the current block.

Appends an OpImageSparseSampleImplicitLod instruction to the current block.

Appends an OpImageSparseSampleExplicitLod instruction to the current block.

Appends an OpImageSparseSampleExplicitLod instruction to the current block.

Appends an OpImageSparseSampleDrefImplicitLod instruction to the current block.

Appends an OpImageSparseSampleDrefImplicitLod instruction to the current block.

Appends an OpImageSparseSampleDrefExplicitLod instruction to the current block.

Appends an OpImageSparseSampleDrefExplicitLod instruction to the current block.