lang: rename signed integer types sN -> iN
Surface rename of the signed integer family: s1..s64 become i1..i64
(u1..u64, usize, isize unchanged). 'string' keeps the s-prefix arm in
name classification; width parsing moves to the i-prefix arm next to
isize.
Internal TypeId tags follow the surface (.s8/.s16/.s32/.s64 ->
.i8/.i16/.i32/.i64), as do mono-key mangle fragments (ptr_i64,
tu_i64_bool) and all display/diagnostic formatting (i{d}).
Migrated in the same sweep: stdlib + examples + issue repros + FFI C
companions (shared symbol names like ffi_id_i64), expected
stdout/stderr/ir snapshots, specs.md, readme.md, CLAUDE.md/AGENTS.md,
implementation_plan.md, docs/, issue writeups. Vendored stb_image and
historical flow state left untouched.
zig build test: 426/426; examples suite: 595/595.
This commit is contained in:
@@ -11,10 +11,10 @@ GPU :: protocol {
|
||||
// Bind the GPU to a backend-specific render target (e.g. a
|
||||
// CAMetalLayer on iOS). pixel_w/pixel_h are the drawable's pixel
|
||||
// dimensions; call resize when they change.
|
||||
init :: (target: *void, pixel_w: s32, pixel_h: s32) -> bool;
|
||||
init :: (target: *void, pixel_w: i32, pixel_h: i32) -> bool;
|
||||
shutdown :: ();
|
||||
|
||||
resize :: (pixel_w: s32, pixel_h: s32);
|
||||
resize :: (pixel_w: i32, pixel_h: i32);
|
||||
|
||||
begin_frame :: (clear: ClearColor) -> bool;
|
||||
|
||||
@@ -26,17 +26,17 @@ GPU :: protocol {
|
||||
end_frame :: (target_time: f64);
|
||||
|
||||
create_shader :: (vsrc: string, fsrc: string) -> ShaderHandle;
|
||||
create_buffer :: (size_bytes: s64) -> BufferHandle;
|
||||
update_buffer :: (buf: BufferHandle, data: *void, size_bytes: s64);
|
||||
create_buffer :: (size_bytes: i64) -> BufferHandle;
|
||||
update_buffer :: (buf: BufferHandle, data: *void, size_bytes: i64);
|
||||
// Sub-buffer write at a byte offset. Required for Metal where re-using
|
||||
// the same buffer slice across multiple draws in a single command
|
||||
// encoder is a race: the GPU executes draws asynchronously and reads
|
||||
// shared-storage buffer contents at execution time, so the LAST writer
|
||||
// wins if every flush targets offset 0. Renderers that issue more than
|
||||
// one draw per frame must advance their write offset between flushes.
|
||||
update_buffer_at :: (buf: BufferHandle, data: *void, size_bytes: s64, byte_offset: s64);
|
||||
create_texture :: (w: s32, h: s32, format: TextureFormat, pixels: *void) -> TextureHandle;
|
||||
update_texture_region :: (tex: TextureHandle, x: s32, y: s32, w: s32, h: s32, pixels: *void);
|
||||
update_buffer_at :: (buf: BufferHandle, data: *void, size_bytes: i64, byte_offset: i64);
|
||||
create_texture :: (w: i32, h: i32, format: TextureFormat, pixels: *void) -> TextureHandle;
|
||||
update_texture_region :: (tex: TextureHandle, x: i32, y: i32, w: i32, h: i32, pixels: *void);
|
||||
|
||||
// Release a GPU resource. Implementations release the backing object and
|
||||
// null the slot so the handle becomes inert. Calling with handle 0 or
|
||||
@@ -49,9 +49,9 @@ GPU :: protocol {
|
||||
set_shader :: (sh: ShaderHandle);
|
||||
set_vertex_buffer :: (buf: BufferHandle);
|
||||
set_texture :: (slot: u32, tex: TextureHandle);
|
||||
set_vertex_constants :: (slot: u32, data: *void, size_bytes: s64);
|
||||
set_scissor :: (x: s32, y: s32, w: s32, h: s32);
|
||||
set_vertex_constants :: (slot: u32, data: *void, size_bytes: i64);
|
||||
set_scissor :: (x: i32, y: i32, w: i32, h: i32);
|
||||
disable_scissor :: ();
|
||||
|
||||
draw_triangles :: (vertex_offset: s32, vertex_count: s32);
|
||||
draw_triangles :: (vertex_offset: i32, vertex_count: i32);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user