Add separate sampler objects, some additional renaming (more in line with WebGPU conventions).
TODO:
[x] sokol-zig:
[x] merge zig-0.11.0 branch into master, required to make the if (@available(...)) stuff work with Zig
[x] sokol bindgen: merge the bindgen-sokol-zig-0.11.0 into sgfx-samplers-bindings
[x] fix samples webpage
[x] create tags pre-separate-samplers in:
[x] sokol
[x] sokol-tools
[x] sokol-tools-bin
[x] sokol-samples
[x] sokol-zig
[x] sokol-nim
[x] sokol-odin
[x] sokol-rust
[x] changelog updates
[x] sokol-shdc
[x] sokol
[x] blog post?
[x] fix sokol-spine trying to stash an image- and sampler-id into the render_object pointer => probably need to heap allocate an image-sampler-pair struct and use the render_object to point there...
[x] fix sokol-shdc tests
[x] don't allow to override the sampler object in sokol_imgui.h (because ImTextureID is 32-bits on WASM)
[x] don't allow to override the sampler object in sokol_nuklear.h (because nk_handle is 32-bits on WASM)
[x] fix iOS Metal backend errors
[x] extend Windows GL loader with new sampler functions
[x] sg_begin_pass() => don't take width/height from first color attachment
[x] _sg_mtl_begin_pass()
[x] _sg_gl_begin_pass()
[x] _sg_d3d11_begin_pass()
[ ] new sample which samples depth texture with a comparison sampler
[x] macOS/Metal
[x] macOS/GL
[x] iOS/Metal
[ ] iOS/GL (something unrelated seems to be broken currently with iOS/GL on the simulator)
[x] Windows/D3D11
[x] Windows/GL
[x] Linux/GL
[x] Linux/GLES3
[x] Android/GLES3
[x] Emscripten/GLES3
[x] new sample which fetches samples from an MSAA texture (???) (won't work on the GL backend anyway, better to wait with this after the WebGPU backend is finished)
[x] doc updates:
[x] sokol_gfx.h
[x] sokol-shdc
[x] sokol_gl.h
[x] sokol_debugtext.h (no public API changes)
[x] sokol_fontstash.h (no public API changes)
[x] sokol_spine.h
[x] sokol_imgui.h
[x] sokol_nuklear.h
[x] sokol_shape.h
[x] sokol_gfx_imgui.h
[x] fix util headers (except hlsl shaders):
[x] sokol_debugtext.h
[x] sokol_fontstash.h
[x] sokol_gl.h
[x] sokol_imgui.h
[x] sokol_nuklear.h
[x] sokol_spine.h
[x] sokol_shape.h
[x] sokol_gfx_imgui.h
[x] update hlsl shaders in:
[x] sokol_debugtext.h
[x] sokol_fontstash.h
[x] sokol_gl.h
[x] sokol_imgui.h
[x] sokol_nuklear.h
[x] sokol_spine.h
[x] fix samples:
[x] d3d11
[x] glfw
[x] html5
[x] metal
[x] sapp
[x] fix sokol-shdc backends:
[x] zig
[x] odin
[x] nim
[x] rust
[x] bare
[x] ...?
[x] fix language bindings (also special case names):
[x] sokol-zig
[x] sokol-odin
[x] sokol-nim
[x] sokol-rust
[x] fix language bindings samples:
[x] sokol-zig
[x] sokol-odin
[x] sokol-nim
[x] sokol-rust
What's new:
Fix: sg_begin_pass() would use the wrong attachment width/height if rendering to a mip level
Metal backend now checks for shared vs managed resources support on macOS
Metal backend now supports clamp-to-border-color on iOS devices if possible (depends on iOS version and GPU family)
new sg_desc.mtl_force_managed_storage_mode config boolean to force managed storage mode on macOS devices (mainly useful for debugging)
new funcs:
sg_make_sampler()
sg_destroy_sampler()
sg_init_sampler()
sg_uninit_sampler()
sg_alloc_sampler()
sg_dealloc_sampler()
sg_fail_sampler()
removed sampler state in sg_image_desc:
.min_filter
.mag_filter
.wrap_u
.wrap_v
.wrap_w
.border_color
.max_anisotropy
.min_lod
.max_lod
sg_filter reduced to: none, nearest, linear
new struct: sg_sampler_desc: sampler state moved over from sg_image_desc, plus:
.mipmap_filter
.compare
additional reflection state and some general cleanup in sg_shader_desc (requires new sokol-shdc version):
new: sg_shader_image_desc.used
new: sg_shader_image_desc.multisampled
new: sg_sampler_type renamed to sg_image_sample_type
removed: sg_shader_image_desc.name
new struct: sg_shader_sampler_desc
repurposed enum sg_sampler_type (sample vs compare)
new struct: sg_shader_image_sampler_pair_desc
fix sokol-shdc so that it's possible to use textureSize()
sokol_gl.h (shaders, and sgl_texture() now takes sg_image + sg_sampler)
sokol_imgui.h (shaders, new helper function simgui_imtextureid() to create ImTextureID handle from sg_image and sg_sampler)
sokol_nuklear.h (shader, snk_nkhandle() helper function to wrap sg_image+sg_sampler in nk_handle => use nk_image_handle(snk_nkhandle(img, smp)) to create a Nuklear image handle!
sokol_shapes.h rename some functions to match sokol_gfx.h struct renamings
sokol_spine.h: (shaders, user needs to create sampler via sg_init_sampler() (similar to sg_init_image))
sokolgfx.h: remove err trace hook functions (redundant with new error logging)
Add separate sampler objects, some additional renaming (more in line with WebGPU conventions).
TODO:
if (@available(...))
stuff work with Zigpre-separate-samplers
in:blog post?new sample which fetches samples from an MSAA texture (???)(won't work on the GL backend anyway, better to wait with this after the WebGPU backend is finished)sokol_debugtext.h(no public API changes)sokol_fontstash.h(no public API changes)What's new:
sg_desc.mtl_force_managed_storage_mode
config boolean to force managed storage mode on macOS devices (mainly useful for debugging)nk_image_handle(snk_nkhandle(img, smp))
to create a Nuklear image handle!