Module spirv_std::arch[][src]

SPIR-V Instrinics

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.

Functions

all

Result is true if all components of vector is true, otherwise result is false.

any

Result is true if any component of vector is true, otherwise result is false.

ddx

Returns the partial derivative of Self with respect to the window’s X coordinate. Returns the same result as either [Self::ddx_fine] or [Self::ddx_coarse], selection of which one is dependent on external factors.

ddx_coarse

Returns the partial derivative of Self with respect to the window’s X coordinate. Uses local differencing based on the value of Self for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of Self 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 [Self::ddx_fine].

ddx_coarse_vector

Returns the partial derivative of Self with respect to the window’s X coordinate. Uses local differencing based on the value of Self for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of Self 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 [Self::ddx_fine].

ddx_fine

Returns the partial derivative of Self with respect to the window’s X coordinate. Uses local differencing based on the value of Self for the current fragment and its immediate neighbor(s).

ddx_fine_vector

Returns the partial derivative of Self with respect to the window’s X coordinate. Uses local differencing based on the value of Self for the current fragment and its immediate neighbor(s).

ddx_vector

Returns the partial derivative of Self with respect to the window’s X coordinate. Returns the same result as either [Self::ddx_fine] or [Self::ddx_coarse], selection of which one is dependent on external factors.

ddy

Returns the partial derivative of Self with respect to the window’s Y coordinate. Returns the same result as either [Self::ddy_fine] or [Self::ddy_coarse], selection of which one is dependent on external factors.

ddy_coarse

Returns the partial derivative of Self with respect to the window’s Y coordinate. Uses local differencing based on the value of Self for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of Self 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 [Derivative::ddy_fine].

ddy_coarse_vector

Returns the partial derivative of Self with respect to the window’s Y coordinate. Uses local differencing based on the value of Self for the current fragment’s neighbors, and possibly, but not necessarily, includes the value of Self 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 [Derivative::ddy_fine].

ddy_fine

Returns the partial derivative of Self with respect to the window’s Y coordinate. Uses local differencing based on the value of Self for the current fragment and its immediate neighbor(s).

ddy_fine_vector

Returns the partial derivative of Self with respect to the window’s Y coordinate. Uses local differencing based on the value of Self for the current fragment and its immediate neighbor(s).

ddy_vector

Returns the partial derivative of Self with respect to the window’s Y coordinate. Returns the same result as either [Self::ddy_fine] or [Self::ddy_coarse], selection of which one is dependent on external factors.

emit_stream_vertex

Emits the current values of all output variables to the current output primitive. After execution, the values of all output variables are undefined.

emit_vertex

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.

end_primitive

Finish the current primitive and start a new one. No vertex is emitted. Requires capability Geometry.

end_stream_primitive

Finish the current primitive and start a new one. No vertex is emitted.

f_add_vector

Floating-point addition of x and y. Results are computed per component.

f_div_vector

Floating-point division of x from y. Results are computed per component.

f_mod_vector

Floating-point modulo operation from x modulo y, whose sign matches the sign of y. Results are computed per component.

f_mul_vector

Floating-point multiplication of x and y. Results are computed per component.

f_negate_vector

Floating-point subtract of operand from zero. Results are computed per component.

f_rem_vector

Floating-point remainder operation for getting the remainder from x / y whose sign matches the sign of x. Results are computed per component.

f_sub_vector

Floating-point subtract of x from y. Results are computed per component.

fwidth

Returns the sum of the absolute values of [Self::ddx] and [Self::ddy] as a single operation.

fwidth_coarse

Returns the sum of the absolute values of [Self::ddx_coarse] and [Self::ddy_coarse] as a single operation.

fwidth_coarse_vector

Returns the sum of the absolute values of [Self::ddx_coarse] and [Self::ddy_coarse] as a single operation.

fwidth_fine

Returns the sum of the absolute values of [Self::ddx_fine] and [Self::ddy_fine] as a single operation.

fwidth_fine_vector

Returns the sum of the absolute values of [Self::ddx_fine] and [Self::ddy_fine] as a single operation.

fwidth_vector

Returns the sum of the absolute values of [Self::ddx] and [Self::ddy] as a single operation.

i_add_vector

Integer addition of x and y. Results are computed per component.

i_mul_vector

Integer multiplication of x and y. Results are computed per component.

i_sub_vector

Signed-integer subtract of x from y. Results are computed per component.

s_div_vector

Signed-integer division of x from y. Results are computed per component.

s_mod_vector

Signed-integer modulo operation from x modulo y, whose sign matches the sign of y. Results are computed per component.

s_negate_vector

Signed-integer subtract of operand from zero. Results are computed per component.

s_rem_vector

Signed-integer remainder operation for getting the remainder from x / y whose sign matches the sign of x.

u_div_vector

Unsigned-integer division of x from y. Results are computed per component.

u_mod_vector

Unsigned modulo operation of x modulo y. Results are computed per component.

vector_extract_dynamic

Extract a single, dynamically selected, component of a vector.

vector_insert_dynamic

Make a copy of a vector, with a single, variably selected, component modified.

vector_times_scalar

Scale a floating-point vector by scalar. Each component of vector is multiplied by scalar.