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

Add support for storage buffers in C3 generator + small fixes #158

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

radekm
Copy link
Contributor

@radekm radekm commented Dec 1, 2024

No description provided.

@radekm radekm changed the title [WIP] Add support for storage buffers in C3 generator Add support for storage buffers in C3 generator + small fixes Dec 19, 2024
@radekm
Copy link
Contributor Author

radekm commented Dec 19, 2024

@floooh I believe this is ready to be merged.

@floooh
Copy link
Owner

floooh commented Jan 12, 2025

Ooops, sorry for the delay. I'm currently catching up on PRs and will look into this next.

@radekm radekm force-pushed the c3-lang-support-storage-buffers branch from 372bcb0 to 4132803 Compare January 27, 2025 08:27
Comment on lines +63 to +65
case Type::Float4: l("float[4][{}] {};\n", uniform.array_count, uniform.name); break;
case Type::Int4: l("int[4][{}] {};\n", uniform.array_count, uniform.name); break;
case Type::Mat4x4: l("float[16][{}] {};\n", uniform.array_count, uniform.name); break;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sneaky... so apparently C3 has inverted dimensions (inner-most to outer-most) for declaring the array, but then C-style index order for array item access? Weird but ok ;)

https://c3-lang.org/language-common/arrays/#fixed-size-multi-dimensional-arrays

@floooh floooh merged commit f57a55c into floooh:master Feb 10, 2025
4 checks passed
@floooh
Copy link
Owner

floooh commented Feb 10, 2025

Ok merged. Now on to floooh/sokol#1148 :)

@floooh
Copy link
Owner

floooh commented Feb 10, 2025

Binaries in https://github.com/floooh/sokol-tools-bin have been updated too.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants