Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

C shader reflection is out of date after "bindings cleanup" changes #167

Closed
jdah opened this issue Jan 22, 2025 · 3 comments
Closed

C shader reflection is out of date after "bindings cleanup" changes #167

jdah opened this issue Jan 22, 2025 · 3 comments

Comments

@jdah
Copy link
Contributor

jdah commented Jan 22, 2025

As of the latest commit (and since the "bindings cleanup" back in November?) it looks like the sokolc.cc reflection backend generates sg_shader_uniform_desc <module>_<program>_uniform_desc(sg_shader_stage stage, const char* ub_name, const char* u_name) which as far as I can tell is out of date (type is no longer in sokol_gfx.h) and been bundled into a larger sg_shader_desc. Looks like it's the only backend still generating this type as well.

Am I missing something or does this need to be updated?

EDIT: looks like I'm slightly mistaken, I think actually this is just an issue in the forward declarations of the reflection functions in the C backend at sokolc.cc:55:

void SokolCGenerator::gen_prerequisites(const GenInput& gen) {

will see what I can do about a PR to fix this.

@jdah
Copy link
Contributor Author

jdah commented Jan 22, 2025

the (tiny) fix is at #168 :)

@floooh
Copy link
Owner

floooh commented Jan 22, 2025

Hmm, you're right. The problem doesn't show up in the sokol-samples because those prototypes are only generated with -f sokol_impl (while the default is sokol which doesn't require prototypes because it uses static and static inline instead).

Will merge your PR right away, one sec.

floooh added a commit that referenced this issue Jan 22, 2025
Update sokolc.cc gen_prerequisites for bindings cleanup (fix for #167)
@floooh
Copy link
Owner

floooh commented Jan 22, 2025

Fixed via #168

@floooh floooh closed this as completed Jan 22, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants