Giter VIP home page Giter VIP logo

Comments (5)

dneto0 avatar dneto0 commented on May 21, 2024

Can you replicate the problem with the glslc command line tool?
What is in the included file?

I've copied your code locally, and made 'path/test.glsl' and empty file, but can't reproduce your problem.
If I move the include file out of the way or make it unreadable I get:

$ glslc -E x.vert
x.vert:4: error: '#include' : Cannot find or open include file. for header name: path/test.glsl
1 error generated.

If I put garbage in path/test.glsl I get:

$ glslc -c x.vert
path/test.glsl:2: error: '' :  syntax error
1 error generated.

from shaderc.

realitix avatar realitix commented on May 21, 2024

Indeed with glslc I got the good error. I am wondering why I obtain a malformated error with libshaderc... I continue to dig.

from shaderc.

realitix avatar realitix commented on May 21, 2024

Ok it was my fault:
When calling shaderc_compile_into_spv, I didn't pass the last argument options which contains my includes callback.
That doesn't explain the encoding error but I can live with that.
So I close it. Thanks @dneto0

from shaderc.

dneto0 avatar dneto0 commented on May 21, 2024

Reopening. I can reproduce it.

When I send in an options object that does not have an includer set (this is the defaul), then I get garbled text in the error message.

Example output:

shader_src:2: error: '#include' :  ���� for header name: bar

I suspect Glslang should error out more sensibly, but will keep this open here so I track resolution.

from shaderc.

realitix avatar realitix commented on May 21, 2024

I was not dreaming! Thanks @dneto0

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.