Git Product home page Git Product logo

Comments (7)

antiagainst avatar antiagainst commented on May 2, 2024

Hi @acterhd,

Do you mean removing the OpSourceExtension GL_GOOGLE_include_directive line in the generated SPIR-V binary module? That actually can be done via the -Os option on glslc (or SetOptimizationLevel for the library API). Yeah, that also runs some other optimization stuff, but I think it's beneficial for productive code. More fine-grained controlling is something not supported yet and should be a TODO.

Hope this solves your problem. Let me know if I am not answering your question. Thanks!

from shaderc.

 avatar commented on May 2, 2024

In glslc none this flag... Even if I built from source. Used old version...

Also, issues with

./shaders/voxelizer/voxelizer.vert.spv


./shaders/voxelizer/voxelizer.geom.spv


./shaders/voxelizer/voxelizer.frag.spv

Geometry info
-------------
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)
error: binding mismatch between shaders for SSBO (named __defaultname)

Fragment info
-------------
(0) : fatal error C9999: *** exception during compilation ***

Link info
---------
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders
error: different buffer variables (named  and ) sharing the same offset within a storage block (named ) between shaders

from shaderc.

antiagainst avatar antiagainst commented on May 2, 2024

Hmm, now I'm suspecting that the driver compiler is using debug instruction for some meaningful stuff (use OpName for interface matching, etc. which is why the above errors since -Os removes all debug instructions), which is not supposed to be the case: https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html#OpSourceExtension. (Notice the "no semantic impact and can safely be removed from a module" part, which means, with or without OpSourceExtension/OpName, the module should just work fine.)

Could you provide the original error from the driver compiler before applying -Os? Thanks!

from shaderc.

 avatar commented on May 2, 2024

Okay.... I can't load any compute shader from SPIR-V in OpenGL...
I tried all variants.

from shaderc.

antiagainst avatar antiagainst commented on May 2, 2024

Oh, glad to see you've figured out this by yourself. Sorry didn't provide much help. I'll close this for now.

from shaderc.

 avatar commented on May 2, 2024

I anyway can't load SPIR-V modules...

from shaderc.

dneto0 avatar dneto0 commented on May 2, 2024

Loading SPIR-V into OpenGL is a recently-ratified extension.
https://www.opengl.org/registry/specs/ARB/gl_spirv.txt
I'd first check to make sure that your driver supports that extension.

from shaderc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.