keith2018 / spvm

Tiny C++ SPIR-V virtual machine (interpreter), can be used for shader debugging. Spvm-ShaderToy simulated the runtime environment of shadertoy, and execute shader code using SPVM.
MIT License
137 stars 25 forks source link

64 bit support is part of GLSL.std.450 #26

Open danilw opened 2 years ago

danilw commented 2 years ago

I think this should be todo to add 64 bit support.

Specifications that the project follows is: GLSL.std.450

When:

Only support 32-bits width Numerical type (float, integer)

https://registry.khronos.org/SPIR-V/specs/1.0/GLSL.std.450.html

You can see there listed functions that support only 16-32 bit: 1

And when it says "component type is floating-point" - function support all float types: 2

Without 64 bit support it downgrade to GLES 3.3, but you use SPIRV so...

keith2018 commented 2 years ago

Yes, 64-bit numerical type should be supported, there are instructions works only for 64-bit float such as PackDouble2x32, UnpackDouble2x32