mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
gpu: [compute] remove even more unused commands
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
File diff suppressed because one or more lines are too long
+9
-54
@@ -2,10 +2,6 @@
|
|||||||
|
|
||||||
// Code auto-generated by piet-gpu-derive
|
// Code auto-generated by piet-gpu-derive
|
||||||
|
|
||||||
struct CmdLineRef {
|
|
||||||
uint offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CmdStrokeRef {
|
struct CmdStrokeRef {
|
||||||
uint offset;
|
uint offset;
|
||||||
};
|
};
|
||||||
@@ -46,17 +42,6 @@ struct CmdRef {
|
|||||||
uint offset;
|
uint offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CmdLine {
|
|
||||||
vec2 start;
|
|
||||||
vec2 end;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CmdLine_size 16
|
|
||||||
|
|
||||||
CmdLineRef CmdLine_index(CmdLineRef ref, uint index) {
|
|
||||||
return CmdLineRef(ref.offset + index * CmdLine_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct CmdStroke {
|
struct CmdStroke {
|
||||||
uint tile_ref;
|
uint tile_ref;
|
||||||
float half_width;
|
float half_width;
|
||||||
@@ -157,42 +142,21 @@ CmdJumpRef CmdJump_index(CmdJumpRef ref, uint index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define Cmd_End 0
|
#define Cmd_End 0
|
||||||
#define Cmd_Line 1
|
#define Cmd_Fill 1
|
||||||
#define Cmd_Fill 2
|
#define Cmd_FillImage 2
|
||||||
#define Cmd_FillImage 3
|
#define Cmd_BeginClip 3
|
||||||
#define Cmd_BeginClip 4
|
#define Cmd_BeginSolidClip 4
|
||||||
#define Cmd_BeginSolidClip 5
|
#define Cmd_EndClip 5
|
||||||
#define Cmd_EndClip 6
|
#define Cmd_Stroke 6
|
||||||
#define Cmd_Stroke 7
|
#define Cmd_Solid 7
|
||||||
#define Cmd_Solid 8
|
#define Cmd_SolidImage 8
|
||||||
#define Cmd_SolidImage 9
|
#define Cmd_Jump 9
|
||||||
#define Cmd_Jump 10
|
|
||||||
#define Cmd_size 20
|
#define Cmd_size 20
|
||||||
|
|
||||||
CmdRef Cmd_index(CmdRef ref, uint index) {
|
CmdRef Cmd_index(CmdRef ref, uint index) {
|
||||||
return CmdRef(ref.offset + index * Cmd_size);
|
return CmdRef(ref.offset + index * Cmd_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
CmdLine CmdLine_read(Alloc a, CmdLineRef ref) {
|
|
||||||
uint ix = ref.offset >> 2;
|
|
||||||
uint raw0 = read_mem(a, ix + 0);
|
|
||||||
uint raw1 = read_mem(a, ix + 1);
|
|
||||||
uint raw2 = read_mem(a, ix + 2);
|
|
||||||
uint raw3 = read_mem(a, ix + 3);
|
|
||||||
CmdLine s;
|
|
||||||
s.start = vec2(uintBitsToFloat(raw0), uintBitsToFloat(raw1));
|
|
||||||
s.end = vec2(uintBitsToFloat(raw2), uintBitsToFloat(raw3));
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CmdLine_write(Alloc a, CmdLineRef ref, CmdLine s) {
|
|
||||||
uint ix = ref.offset >> 2;
|
|
||||||
write_mem(a, ix + 0, floatBitsToUint(s.start.x));
|
|
||||||
write_mem(a, ix + 1, floatBitsToUint(s.start.y));
|
|
||||||
write_mem(a, ix + 2, floatBitsToUint(s.end.x));
|
|
||||||
write_mem(a, ix + 3, floatBitsToUint(s.end.y));
|
|
||||||
}
|
|
||||||
|
|
||||||
CmdStroke CmdStroke_read(Alloc a, CmdStrokeRef ref) {
|
CmdStroke CmdStroke_read(Alloc a, CmdStrokeRef ref) {
|
||||||
uint ix = ref.offset >> 2;
|
uint ix = ref.offset >> 2;
|
||||||
uint raw0 = read_mem(a, ix + 0);
|
uint raw0 = read_mem(a, ix + 0);
|
||||||
@@ -341,10 +305,6 @@ uint Cmd_tag(Alloc a, CmdRef ref) {
|
|||||||
return read_mem(a, ref.offset >> 2);
|
return read_mem(a, ref.offset >> 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
CmdLine Cmd_Line_read(Alloc a, CmdRef ref) {
|
|
||||||
return CmdLine_read(a, CmdLineRef(ref.offset + 4));
|
|
||||||
}
|
|
||||||
|
|
||||||
CmdFill Cmd_Fill_read(Alloc a, CmdRef ref) {
|
CmdFill Cmd_Fill_read(Alloc a, CmdRef ref) {
|
||||||
return CmdFill_read(a, CmdFillRef(ref.offset + 4));
|
return CmdFill_read(a, CmdFillRef(ref.offset + 4));
|
||||||
}
|
}
|
||||||
@@ -385,11 +345,6 @@ void Cmd_End_write(Alloc a, CmdRef ref) {
|
|||||||
write_mem(a, ref.offset >> 2, Cmd_End);
|
write_mem(a, ref.offset >> 2, Cmd_End);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cmd_Line_write(Alloc a, CmdRef ref, CmdLine s) {
|
|
||||||
write_mem(a, ref.offset >> 2, Cmd_Line);
|
|
||||||
CmdLine_write(a, CmdLineRef(ref.offset + 4), s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Cmd_Fill_write(Alloc a, CmdRef ref, CmdFill s) {
|
void Cmd_Fill_write(Alloc a, CmdRef ref, CmdFill s) {
|
||||||
write_mem(a, ref.offset >> 2, Cmd_Fill);
|
write_mem(a, ref.offset >> 2, Cmd_Fill);
|
||||||
CmdFill_write(a, CmdFillRef(ref.offset + 4), s);
|
CmdFill_write(a, CmdFillRef(ref.offset + 4), s);
|
||||||
|
|||||||
Reference in New Issue
Block a user