[Mesa-dev] [PATCH 03/13] docs: Initial version of INTEL_shader_atomic_float_minmax spec
Caio Marcelo de Oliveira Filho
caio.oliveira at intel.com
Fri Aug 17 01:02:53 UTC 2018
> + (add a new row after the exiting "atomicMax" table row, p. 179)
> + float atomicMax(inout float mem, float data)
> + Computes a new value by taking the maximum of the value of data and
> + the contents of mem. If one of these is an IEEE signaling NaN (i.e.,
The two lines above have different indentations, maybe the
"Computes..." line should be starting with a TAB.
> +Interactions with OpenGL 4.6 and ARB_gl_spirv
> + If OpenGL 4.6 or ARB_gl_spirv is supported, then
> + SPV_INTEL_shader_atomic_float_minmax must also be supported.
Couldn't find the SPIR-V extension, but I guess is work in
progress. Is there a Vulkan extension too?
> + * atomicMin and atomicMax implement the IEEE specification with respect to
> + NaN. IEEE considers two different kinds of NaN: signaling NaN and quiet
> + NaN. A quiet NaN has the most significant bit of the mantissa set, and
> + a signaling NaN does not. This concept does not exist in SPIR-V,
> + Vulkan, or OpenGL. Let qNaN denote a quiet NaN and sNaN denote a
> + signaling NaN. atomicMin and atomicMax specifically implement
> + - fmin(qNaN, x) = fmin(x, qNaN) = fmax(qNaN, x) = fmax(x, qNaN) = x
> + - fmin(sNaN, x) = fmin(x, sNaN) = fmax(sNaN, x) = fmax(x, sNaN) = sNaN
> + - fmin(sNaN, qNaN) = fmin(qNaN, sNaN) = fmax(sNaN, qNaN) =
> + fmax(qNaN, sNaN) = sNaN
For the two items above, is it implicit that the result will be
quietized? This matters when using such result with other operation
with a real value, e.g. is "fmin(fmin(x, sNaN), y)" equals to "y" or
The PRM for Skylake says
"Max(x, sNaN) = Max(sNaN, x) = qNaN (quietized value corresponding
to the input sNaN) and signal the Invalid Operation exception."
More information about the mesa-dev