[Flint] adding array_length and some math operations encoding
Mirror Gitea refs to GitHub / mirror (push) Successful in 16s
Build / build (push) Failing after 57s
Test / build_and_test (push) Successful in 3m52s

This commit is contained in:
2026-08-30 19:57:09 +02:00
parent cd4f87a99f
commit d357b722ba
18 changed files with 622 additions and 109 deletions
+20
View File
@@ -28,6 +28,13 @@ pub const StoreBuffer = struct {
source: operand.Source,
};
pub const ArrayLength = struct {
destination: operand.Destination,
buffer: BufferReference,
byte_offset: operand.Source,
stride: u32,
};
pub const SurfaceRead = struct {
destination: operand.Destination,
binding_table: u8,
@@ -93,15 +100,28 @@ pub const Compare = struct {
rhs: operand.Source,
};
pub const MathOpcode = enum {
integer_quotient,
};
pub const Math = struct {
opcode: MathOpcode,
destination: operand.Destination,
lhs: operand.Source,
rhs: operand.Source,
};
pub const Operation = union(enum) {
load_global_invocation_id: LoadGlobalInvocationId,
load_buffer: LoadBuffer,
store_buffer: StoreBuffer,
array_length: ArrayLength,
surface_read: SurfaceRead,
surface_write: SurfaceWrite,
surface_message: SurfaceMessage,
move: Move,
binary: Binary,
math: Math,
compare: Compare,
parallel_copy: pseudo.ParallelCopy,
};