diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-09-17 20:07:37 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-09-17 20:07:37 +0200 |
| commit | bb59a62df8e2b849da3874b7656e2335d748d2ca (patch) | |
| tree | ea076be8799689d4ee748c5a6a30321d91ab21fe | |
| parent | 3e25034ef0c6c24ad6926b9fd373b04429e4c4b2 (diff) | |
sokol_gfx.h mtl: populate the new sg_limits
| -rw-r--r-- | sokol_gfx.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h index 28eb7925..ac5bfa26 100644 --- a/sokol_gfx.h +++ b/sokol_gfx.h @@ -14274,6 +14274,7 @@ _SOKOL_PRIVATE void _sg_mtl_init_caps(void) { _sg.limits.max_image_size_3d = 2 * 1024; _sg.limits.max_image_size_array = 16 * 1024; _sg.limits.max_image_array_layers = 2 * 1024; + _sg.limits.max_texture_bindings_per_stage = _sg_min(128, SG_MAX_VIEW_BINDSLOTS); #else // FIXME: newer iOS devices support 16k textures _sg.limits.max_image_size_2d = 8 * 1024; @@ -14281,7 +14282,11 @@ _SOKOL_PRIVATE void _sg_mtl_init_caps(void) { _sg.limits.max_image_size_3d = 2 * 1024; _sg.limits.max_image_size_array = 8 * 1024; _sg.limits.max_image_array_layers = 2 * 1024; + _sg.limits.max_texture_bindings_per_stage = _sg_min(96, SG_MAX_VIEW_BINDSLOTS); // since iPhone8 #endif + _sg.limits.max_storage_image_bindings_per_stage = _sg.limits.max_texture_bindings_per_stage; // shared with texture bindings + _sg.limits.max_storage_buffer_bindings_per_stage = _sg_min(31 - (SG_MAX_VERTEXBUFFER_BINDSLOTS + SG_MAX_UNIFORMBLOCK_BINDSLOTS), SG_MAX_VIEW_BINDSLOTS); + _sg.limits.max_color_attachments = 8; _sg.limits.max_vertex_attrs = SG_MAX_VERTEX_ATTRIBUTES; _sg_pixelformat_all(&_sg.formats[SG_PIXELFORMAT_R8]); |