Nazariglez / notan

Cross-platform multimedia layer
https://nazariglez.github.io/notan-web/
Apache License 2.0
763 stars 53 forks source link

The deprecated crate glsl-to-spirv-1.7.0 is used, and it fails to compile #302

Closed yurivict closed 6 months ago

yurivict commented 6 months ago

It says here that it is deprecated.

And it also fails to compile:

[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/hlslParseHelper.cpp:37:
[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/hlslParseHelper.h:39:
[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/parseVersions.h:41:
[glsl-to-spirv 0.1.7] /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Public/ShaderLang.h:81:22: warning: '__fastcall__' calling convention is not supported for this target [-Wignored-attributes]
[glsl-to-spirv 0.1.7] SH_IMPORT_EXPORT int __fastcall ShFinalize();
[glsl-to-spirv 0.1.7]                      ^
[glsl-to-spirv 0.1.7] /usr/include/sys/cdefs.h:367:35: note: expanded from macro '__fastcall'
[glsl-to-spirv 0.1.7] #define __fastcall      __attribute__((__fastcall__))
[glsl-to-spirv 0.1.7]                                        ^
[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/hlslParseHelper.cpp:37:
[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/hlslParseHelper.h:39:
[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/parseVersions.h:42:
[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Include/InfoSink.h:38:
[glsl-to-spirv 0.1.7] In file included from /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Public/../Include/../Include/Common.h:99:
[glsl-to-spirv 0.1.7] /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Public/../Include/PoolAlloc.h:314:54: error: 'operator=' is a private member of 'glslang::TPoolAllocator'
[glsl-to-spirv 0.1.7]     void setAllocator(TPoolAllocator* a) { allocator = *a; }
[glsl-to-spirv 0.1.7]                                            ~~~~~~~~~ ^ ~~
[glsl-to-spirv 0.1.7] /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Public/../Include/PoolAlloc.h:244:21: note: declared private here
[glsl-to-spirv 0.1.7]     TPoolAllocator& operator=(const TPoolAllocator&);  // don't allow assignment operator
[glsl-to-spirv 0.1.7]                     ^
[glsl-to-spirv 0.1.7] /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/hlslParseHelper.cpp:5766:10: warning: variable 'repeated' set but not used [-Wunused-but-set-variable]
[glsl-to-spirv 0.1.7]     bool repeated = false;
[glsl-to-spirv 0.1.7]          ^
[glsl-to-spirv 0.1.7] /usr/ports/graphics/oculante/work/oculante-0.8.5/cargo-crates/glsl-to-spirv-0.1.7/glslang/hlsl/hlslParseHelper.cpp:8743:33: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
[glsl-to-spirv 0.1.7]     const auto isOutputPatch = [this](TFunction& patchConstantFunction, int param) {
[glsl-to-spirv 0.1.7]                                 ^~~~
[glsl-to-spirv 0.1.7] 3 warnings and 1 error generated.

FreeBSD 13.2

Nazariglez commented 6 months ago

Do you have cmake installed?

We know that glsl-to-spriv is abandoned, is usually a source of issues for notan, but it works fine most of the time. When this is not the case we provide the a feature to use shaderc instead.

We're working towards removing it but is not an easy task, the main alternative is naga and it doesn't work well with glsl->glsl. So future versions of notan will embrace WGPU and WGSL.

Meanwhile I will advice using shaderc instead of glsl-to-spriv.

Some related issues: