Module spirv_std::arch

source ·
Expand description

SPIR-V Intrinsics

This module is intended as a low level abstraction over SPIR-V instructions. These functions will typically map to a single instruction, and will perform no additional safety checks beyond type-checking.

Structs§

  • SubgroupMask is a glam::UVec4 representing a bitmask of all invocations within a subgroup. Mostly used in group ballot operations.

Enums§

Traits§

Functions§

  • Result is true if all components of vector is true, otherwise result is false.
  • Blocks execution of all threads in a group until all memory accesses have been completed.
  • Blocks execution of all threads in a group until all memory accesses have been completed and all threads in the group have reached this call.
  • Result is true if any component of vector is true, otherwise result is false.
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within SCOPE to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within SCOPE to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within SCOPE to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within SCOPE to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within SCOPE to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within SCOPE to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within SCOPE to the same location:
  • Atomically load through ptr using the given SEMANTICS. All subparts of the value that is loaded are read atomically with respect to all other atomic accesses to it within SCOPE.
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Atomically store through ptr using the given SEMANTICS. All subparts of value are written atomically with respect to all other atomic accesses to it within SCOPE.
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:
  • Wait for other invocations of this module to reach the current point of execution.
  • Returns the partial derivative of component with respect to the window’s X coordinate. Returns the same result as either ddx_fine or ddx_coarse, selection of which one is dependent on external factors.
  • Returns the partial derivative of component with respect to the window’s X coordinate. Uses local differencing based on the value of component for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of component for the current fragment. That is, over a given area, the implementation can compute X derivatives in fewer unique locations than would be allowed by ddx_fine.
  • Returns the partial derivative of component with respect to the window’s X coordinate. Uses local differencing based on the value of component for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of component for the current fragment. That is, over a given area, the implementation can compute X derivatives in fewer unique locations than would be allowed by ddx_fine.
  • Returns the partial derivative of component with respect to the window’s X coordinate. Uses local differencing based on the value of component for the current fragment and its immediate neighbor(s).
  • Returns the partial derivative of component with respect to the window’s X coordinate. Uses local differencing based on the value of component for the current fragment and its immediate neighbor(s).
  • Returns the partial derivative of component with respect to the window’s X coordinate. Returns the same result as either ddx_fine or ddx_coarse, selection of which one is dependent on external factors.
  • Returns the partial derivative of component with respect to the window’s Y coordinate. Returns the same result as either ddy_fine or ddy_coarse, selection of which one is dependent on external factors.
  • Returns the partial derivative of component with respect to the window’s Y coordinate. Uses local differencing based on the value of component for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of component for the current fragment. That is, over a given area, the implementation can compute Y derivatives in fewer unique locations than would be allowed by ddy_fine.
  • Returns the partial derivative of component with respect to the window’s Y coordinate. Uses local differencing based on the value of component for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of component for the current fragment. That is, over a given area, the implementation can compute Y derivatives in fewer unique locations than would be allowed by ddy_fine.
  • Returns the partial derivative of component with respect to the window’s Y coordinate. Uses local differencing based on the value of component for the current fragment and its immediate neighbor(s).
  • Returns the partial derivative of component with respect to the window’s Y coordinate. Uses local differencing based on the value of component for the current fragment and its immediate neighbor(s).
  • Returns the partial derivative of component with respect to the window’s Y coordinate. Returns the same result as either ddy_fine or ddy_coarse, selection of which one is dependent on external factors.
  • Demote fragment shader invocation to a helper invocation. Equivalvent to discard() in HLSL. Any stores to memory after this instruction are suppressed and the fragment does not write outputs to the framebuffer.
  • Blocks execution of all threads in a group until all device memory accesses have been completed.
  • Blocks execution of all threads in a group until all device memory accesses have been completed and all threads in the group have reached this call.
  • Emits the current values of all output variables to the current output primitive. After execution, the values of all output variables are undefined.
  • Emits the current values of all output variables to the current output primitive. After execution, the values of all output variables are undefined. Requires capability Geometry.
  • Finish the current primitive and start a new one. No vertex is emitted. Requires capability Geometry.
  • Finish the current primitive and start a new one. No vertex is emitted.
  • Invoke a callable shader.
  • Returns the sum of the absolute values of ddx and ddy as a single operation.
  • Returns the sum of the absolute values of ddx_coarse and ddy_coarse as a single operation.
  • Returns the sum of the absolute values of ddx_coarse and ddy_coarse as a single operation.
  • Returns the sum of the absolute values of ddx_fine and ddy_fine as a single operation.
  • Returns the sum of the absolute values of ddx_fine and ddy_fine as a single operation.
  • Returns the sum of the absolute values of ddx and ddy as a single operation.
  • Ignores the current potential intersection, terminating the invocation that executes it, and continues the ray traversal. This instruction is allowed only in any_hit execution model.
  • Returns true if the invocation is currently a helper invocation, otherwise result is false. An invocation is currently a helper invocation if it was originally invoked as a helper invocation or if it has been demoted to a helper invocation by demote_to_helper_invocation.
  • Fragment-shader discard. Equivalvent to discard() from GLSL
  • Control the order that memory accesses are observed.
  • Reports an intersection back to the traversal infrastructure.
  • Compute the maximum of two signed integers via a GLSL extended instruction.
  • Compute the minimum of two signed integers via a GLSL extended instruction.
  • Evaluates a predicate for all active invocations in the group, resulting in true if predicate evaluates to true for all active invocations in the group, otherwise the result is false.
  • Evaluates a value for all active invocations in the group. The result is true if Value is equal for all active invocations in the group. Otherwise, the result is false.
  • A bitwise and group operation of all Value operands contributed by active invocations in the group.
  • Evaluates a predicate for all active invocations in the group, resulting in true if predicate evaluates to true for any active invocation in the group, otherwise the result is false.
  • Result is a bitfield value combining the Predicate value from all invocations in the group that execute the same dynamic instance of this instruction. The bit is set to one if the corresponding invocation is active and the Predicate for that invocation evaluated to true; otherwise, it is set to zero.
  • Result is the number of bits that are set to 1 in Value, considering only the bits in Value required to represent all bits of the group’s invocations.
  • Evaluates a value for all active invocations in the group, resulting in true if the bit in Value that corresponds to Index is set to one, otherwise the result is false.
  • Result is the number of bits that are set to 1 in Value, considering only the bits in Value required to represent all bits of the group’s invocations.
  • Find the least significant bit set to 1 in Value, considering only the bits in Value required to represent all bits of the group’s invocations. If none of the considered bits is set to 1, the resulting value is undefined.
  • Find the most significant bit set to 1 in Value, considering only the bits in Value required to represent all bits of the group’s invocations. If none of the considered bits is set to 1, the resulting value is undefined.
  • Result is the number of bits that are set to 1 in Value, considering only the bits in Value required to represent all bits of the group’s invocations.
  • Only usable if the extension GL_KHR_shader_subgroup_basic is enabled.
  • Result is the Value of the invocation identified by the id Id to all active invocations in the group.
  • Result is the Value of the invocation from the active invocation with the lowest id in the group to all active invocations in the group.
  • A bitwise and group operation of all Value operands contributed by active invocations in the group.
  • A floating point add group operation of all Value operands contributed by active invocations in the group.
  • A floating point maximum group operation of all Value operands contributed by active invocations in by group.
  • A floating point minimum group operation of all Value operands contributed by active invocations in the group.
  • A floating point multiply group operation of all Value operands contributed by active invocations in the group.
  • An integer add group operation of all Value operands contributed by active invocations in the group.
  • An integer multiply group operation of all Value operands contributed by active invocations in the group.
  • A logical and group operation of all Value operands contributed by active invocations in the group.
  • A logical or group operation of all Value operands contributed by active invocations in the group.
  • A logical xor group operation of all Value operands contributed by active invocations in the group.
  • A bitwise or group operation of all Value operands contributed by active invocations in the group.
  • A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
  • A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
  • An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
  • An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
  • A bitwise xor group operation of all Value operands contributed by active invocations in the group.
  • Result is true only in the active invocation with the lowest id in the group, otherwise result is false.
  • A bitwise and group operation of all Value operands contributed by active invocations in the group.
  • A floating point add group operation of all Value operands contributed by active invocations in the group.
  • A floating point maximum group operation of all Value operands contributed by active invocations in by group.
  • A floating point minimum group operation of all Value operands contributed by active invocations in the group.
  • A floating point multiply group operation of all Value operands contributed by active invocations in the group.
  • An integer add group operation of all Value operands contributed by active invocations in the group.
  • An integer multiply group operation of all Value operands contributed by active invocations in the group.
  • A logical and group operation of all Value operands contributed by active invocations in the group.
  • A logical or group operation of all Value operands contributed by active invocations in the group.
  • A logical xor group operation of all Value operands contributed by active invocations in the group.
  • A bitwise or group operation of all Value operands contributed by active invocations in the group.
  • A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
  • A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
  • An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
  • An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
  • A bitwise xor group operation of all Value operands contributed by active invocations in the group.
  • A floating point add group operation of all Value operands contributed by active invocations in the group.
  • A floating point maximum group operation of all Value operands contributed by active invocations in by group.
  • A floating point minimum group operation of all Value operands contributed by active invocations in the group.
  • A floating point multiply group operation of all Value operands contributed by active invocations in the group.
  • An integer add group operation of all Value operands contributed by active invocations in the group.
  • An integer multiply group operation of all Value operands contributed by active invocations in the group.
  • A bitwise and group operation of all Value operands contributed by active invocations in the group.
  • A floating point add group operation of all Value operands contributed by active invocations in the group.
  • A floating point maximum group operation of all Value operands contributed by active invocations in by group.
  • A floating point minimum group operation of all Value operands contributed by active invocations in the group.
  • A floating point multiply group operation of all Value operands contributed by active invocations in the group.
  • An integer add group operation of all Value operands contributed by active invocations in the group.
  • An integer multiply group operation of all Value operands contributed by active invocations in the group.
  • A logical and group operation of all Value operands contributed by active invocations in the group.
  • A logical or group operation of all Value operands contributed by active invocations in the group.
  • A logical xor group operation of all Value operands contributed by active invocations in the group.
  • A bitwise or group operation of all Value operands contributed by active invocations in the group.
  • A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
  • A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
  • An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
  • An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
  • A bitwise xor group operation of all Value operands contributed by active invocations in the group.
  • Evaluates a value for all active invocations in the group, resulting in true if the bit in Value for the corresponding invocation is set to one, otherwise the result is false.
  • A logical and group operation of all Value operands contributed by active invocations in the group.
  • A logical or group operation of all Value operands contributed by active invocations in the group.
  • A logical xor group operation of all Value operands contributed by active invocations in the group.
  • Only usable if the extension GL_KHR_shader_subgroup_basic is enabled.
  • Only usable if the extension GL_KHR_shader_subgroup_basic is enabled.
  • Only usable if the extension GL_KHR_shader_subgroup_basic is enabled.
  • Only usable if the extension GL_KHR_shader_subgroup_basic is enabled.
  • A bitwise or group operation of all Value operands contributed by active invocations in the group.
  • Result is the Value of the invocation within the quad with a quad index equal to Index.
  • Swap the Value of the invocation within the quad with another invocation in the quad using Direction.
  • A signed integer maximum group operation of all Value operands contributed by active invocations in the group.
  • A signed integer minimum group operation of all Value operands contributed by active invocations in the group.
  • Result is the Value of the invocation identified by the id Id.
  • Result is the Value of the invocation identified by the current invocation’s id within the group + Delta.
  • Result is the Value of the invocation identified by the current invocation’s id within the group - Delta.
  • Result is the Value of the invocation identified by the current invocation’s id within the group xor’ed with Mask.
  • An unsigned integer maximum group operation of all Value operands contributed by active invocations in the group.
  • An unsigned integer minimum group operation of all Value operands contributed by active invocations in the group.
  • A bitwise xor group operation of all Value operands contributed by active invocations in the group.
  • Terminates the invocation that executes it, stops the ray traversal, accepts the current hit, and invokes the closest_hit execution model (if active). This instruction is allowed only in the any_hit execution model.
  • Compute the maximum of two unsigned integers via a GLSL extended instruction.
  • Compute the minimum of two unsigned integers via a GLSL extended instruction.
  • Extract a single, dynamically selected, component of a vector.
  • Make a copy of a vector, with a single, variably selected, component modified.
  • Blocks execution of all threads in a group until all group shared accesses have been completed.
  • Blocks execution of all threads in a group until all group shared accesses have been completed and all threads in the group have reached this call.