mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
gpu: [compute] remove more unused commands
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+10
-57
@@ -2,10 +2,6 @@
|
||||
|
||||
// Code auto-generated by piet-gpu-derive
|
||||
|
||||
struct CmdCircleRef {
|
||||
uint offset;
|
||||
};
|
||||
|
||||
struct CmdLineRef {
|
||||
uint offset;
|
||||
};
|
||||
@@ -50,18 +46,6 @@ struct CmdRef {
|
||||
uint offset;
|
||||
};
|
||||
|
||||
struct CmdCircle {
|
||||
vec2 center;
|
||||
float radius;
|
||||
uint rgba_color;
|
||||
};
|
||||
|
||||
#define CmdCircle_size 16
|
||||
|
||||
CmdCircleRef CmdCircle_index(CmdCircleRef ref, uint index) {
|
||||
return CmdCircleRef(ref.offset + index * CmdCircle_size);
|
||||
}
|
||||
|
||||
struct CmdLine {
|
||||
vec2 start;
|
||||
vec2 end;
|
||||
@@ -173,44 +157,22 @@ CmdJumpRef CmdJump_index(CmdJumpRef ref, uint index) {
|
||||
}
|
||||
|
||||
#define Cmd_End 0
|
||||
#define Cmd_Circle 1
|
||||
#define Cmd_Line 2
|
||||
#define Cmd_Fill 3
|
||||
#define Cmd_FillImage 4
|
||||
#define Cmd_BeginClip 5
|
||||
#define Cmd_BeginSolidClip 6
|
||||
#define Cmd_EndClip 7
|
||||
#define Cmd_Stroke 8
|
||||
#define Cmd_Solid 9
|
||||
#define Cmd_SolidImage 10
|
||||
#define Cmd_Jump 11
|
||||
#define Cmd_Line 1
|
||||
#define Cmd_Fill 2
|
||||
#define Cmd_FillImage 3
|
||||
#define Cmd_BeginClip 4
|
||||
#define Cmd_BeginSolidClip 5
|
||||
#define Cmd_EndClip 6
|
||||
#define Cmd_Stroke 7
|
||||
#define Cmd_Solid 8
|
||||
#define Cmd_SolidImage 9
|
||||
#define Cmd_Jump 10
|
||||
#define Cmd_size 20
|
||||
|
||||
CmdRef Cmd_index(CmdRef ref, uint index) {
|
||||
return CmdRef(ref.offset + index * Cmd_size);
|
||||
}
|
||||
|
||||
CmdCircle CmdCircle_read(Alloc a, CmdCircleRef 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);
|
||||
CmdCircle s;
|
||||
s.center = vec2(uintBitsToFloat(raw0), uintBitsToFloat(raw1));
|
||||
s.radius = uintBitsToFloat(raw2);
|
||||
s.rgba_color = raw3;
|
||||
return s;
|
||||
}
|
||||
|
||||
void CmdCircle_write(Alloc a, CmdCircleRef ref, CmdCircle s) {
|
||||
uint ix = ref.offset >> 2;
|
||||
write_mem(a, ix + 0, floatBitsToUint(s.center.x));
|
||||
write_mem(a, ix + 1, floatBitsToUint(s.center.y));
|
||||
write_mem(a, ix + 2, floatBitsToUint(s.radius));
|
||||
write_mem(a, ix + 3, s.rgba_color);
|
||||
}
|
||||
|
||||
CmdLine CmdLine_read(Alloc a, CmdLineRef ref) {
|
||||
uint ix = ref.offset >> 2;
|
||||
uint raw0 = read_mem(a, ix + 0);
|
||||
@@ -379,10 +341,6 @@ uint Cmd_tag(Alloc a, CmdRef ref) {
|
||||
return read_mem(a, ref.offset >> 2);
|
||||
}
|
||||
|
||||
CmdCircle Cmd_Circle_read(Alloc a, CmdRef ref) {
|
||||
return CmdCircle_read(a, CmdCircleRef(ref.offset + 4));
|
||||
}
|
||||
|
||||
CmdLine Cmd_Line_read(Alloc a, CmdRef ref) {
|
||||
return CmdLine_read(a, CmdLineRef(ref.offset + 4));
|
||||
}
|
||||
@@ -427,11 +385,6 @@ void Cmd_End_write(Alloc a, CmdRef ref) {
|
||||
write_mem(a, ref.offset >> 2, Cmd_End);
|
||||
}
|
||||
|
||||
void Cmd_Circle_write(Alloc a, CmdRef ref, CmdCircle s) {
|
||||
write_mem(a, ref.offset >> 2, Cmd_Circle);
|
||||
CmdCircle_write(a, CmdCircleRef(ref.offset + 4), s);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user