You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pow
Result is x raised to the y power; xy. The resulting value is undefined if x < 0. Result is undefined if x = 0 and y ≤ 0.
FClamp
Result is min(max(x, minVal), maxVal). The resulting value is undefined if minVal > maxVal. The semantics used by min() and max() are those of FMin and FMax.
SmoothStep The resulting value is undefined if edge0 ≥ edge1.
And others where the result should be inf or nan in SPIRV-VM its not.
Expressions that imply higher order derivatives such as dFdx(dFdx(n)) have undefined results, as do mixed-order derivatives such as dFdx(dFdy(n)). It is assumed that the expression p is continuous and therefore, expressions evaluated via non-uniform control flow may be undefined.
and dFd in the SPIRV-VM just does not work the same as on GPU (SPIRV-VM result incorrect):
shader code for test:
My guess: That a return value is undefined, does not mean, that it is INF or NAN. To use some 'c' jargon slightly out of context 'it could even contain nasal demons', which means: The implementation may return whatever it wants even in inconsistent ways.
That a return value is undefined, does not mean, that it is INF or NAN.
on the GPU GLSL is NAN or INF and many people include me expect NAN or INF in many cases as a result
without NAN and INF any my own shader that longer than 100 lines of code will just work completely wrong
this fact makes it impossible to use SPIRV-VM to actually "debug" anything because behavior of emulation completely different to real GPU shaders result
maybe im wrong, but
https://www.khronos.org/registry/spir-v/specs/unified1/GLSL.std.450.html
And others where the result should be inf or nan in SPIRV-VM its not.
Also dFd https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/dFdx.xhtml
and dFd in the SPIRV-VM just does not work the same as on GPU (SPIRV-VM result incorrect):
shader code for test:
Correct/expected result (screenshot from Vulkan application, but it same in Browser in OpenGL mode):
Result from SPIRV-VM:
The text was updated successfully, but these errors were encountered: