Comments (7)
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.
In Used old version...glslc
none this flag... Even if I built from source.
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.
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.
Okay.... I can't load any compute shader from SPIR-V in OpenGL...
I tried all variants.
from shaderc.
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.
I anyway can't load SPIR-V modules...
from shaderc.
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)
- work around bug in CMake 3.22.1 bug in CMP0128 policy, for compiling SPIRV-Tools tests HOT 2
- shaderc::PreprocessGlsl removes defines from the shader HOT 1
- Shader stage does matter for preprocessing
- Ninja Multi-Config generator fails - Evaluation file to be written multiple times with different content HOT 1
- Including shaderc/CMakeLists.txt as suggested in README not working HOT 4
- Linking error against spirv-tools
- Proper handling of namespace in HLSL
- Is glsl 330 actually supported ?
- Gmock not found HOT 4
- FRP this Android
- No support for source level debug info?
- SPIR_V: Generate nonsemantic shader debug information (with source) HOT 1
- shaderc not found while compiling FFMPEG HOT 1
- tests fail with updated Glslang: TestDashCapOWithDashG fails due to debug output change HOT 2
- enable Glslang tests when Shaderc tests are enabled HOT 1
- "NVVM compilation failed: 3" with mesh shaders
- Build faild when I set BUILD_SHARED_LIBS ON, Windows 10 HOT 1
- RFE: is it possible to start making github releases?🤔 HOT 3
- Optimization issue when specifying --target-env
- [Documentation] gmock appears to be necessary for shaderc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shaderc.