-
Notifications
You must be signed in to change notification settings - Fork 12
Migrates to v0.14 #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
}); | ||
|
||
const zmesh_lib = if (options.shared) blk: { | ||
// TODO addLibrary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addSharedLibrary is deprecated
stride: usize, // 0 == automatically determined by accessor | ||
view_type: BufferViewType, | ||
data: ?*anyopaque, // overrides buffer.data if present, filled by extensions | ||
override_data: ?*anyopaque, // overrides buffer.data if present, filled by extensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new zig v0.14 didn't like that variable and function having the same name
.optimize = optimize, | ||
.lang = .lua54, | ||
.can_use_jmp = !target.result.isWasm(), | ||
// .can_use_jmp = !target.result.cpu.arch.isWasm(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be fixed to have the same funcitonality as with v0.13
} | ||
} | ||
|
||
// TODO check this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to check this
max: Vec3, | ||
center: Vec3, | ||
transform: Mat4 = math.Mat4.identity, | ||
transform_matrix: Mat4 = math.Mat4.identity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new zig v0.14 didn't like that variable and function having the same name
debug.info("Creating shader: {d}", .{graphics.next_shader_handle}); | ||
const shader = sg.makeShader(shader_desc); | ||
|
||
// TODO check this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is correct looking at https://github.com/floooh/sokol/pull/1111/files#diff-5a4303cccd1516d570a9b7a605d2b5ce0487743f686ec7a5fef129b88efa8500
|
||
var enable_debug_logging = false; | ||
|
||
pub var test_me: bool = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaks findLibraryFunctions
@@ -0,0 +1 @@ | |||
Download sokol-shdc from https://github.com/floooh/sokol-tools-bin/tree/bindings-cleanup No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the bindings-cleanup branch explicitly required, hasn't this been merged in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's the latest tag. I though it made sense to link to the specific version of the bin which generated the shaders.
checked with latest master https://github.com/floooh/sokol-tools-bin/tree/9b5a3e2b57fe9783ba4d1f3249059bc4720b592f and the output is the same
Hey @nicoabie I had a quick test of your fork and none of the examples run correctly when compiled for WASM. I'm brand new to zig so not sure how to fix: |
Hi! Thanks for reporting, I'll try to check it out in the following weeks. I'm new to zig as well :) |
Sorry for the delay! Just digging into this now again. When running the stresstest, something seems to be leaking vertex buffer bindslots. Getting the following error.
|
Still tracking this down, but it looks like if I stop caching the common pipelines in the
|
Aha, I think it was a use-after-free in
|
@Interrupt I'm learning zig and I found delve very nice so wanted to contribute
This is missing emscripten for lua natecraddock/ziglua#86
I'll ask again if they can add that flag so we don't need to use your fork anymore}
for changes in the shaders
https://floooh.github.io/2024/11/04/sokol-fall-2024-update.html