[Flint] centralize compute lowering, adding surface messages with GRF
Mirror Gitea refs to GitHub / mirror (push) Successful in 16s
Test / build_and_test (push) Successful in 2m11s
Build / build (push) Successful in 3m18s

allocation
This commit is contained in:
2026-08-27 21:18:05 +02:00
parent 148ed9b441
commit 441d5fbb96
12 changed files with 542 additions and 124 deletions
+17
View File
@@ -32,6 +32,7 @@ pub const Error = error{
UnloweredParallelCopy,
UnloweredSystemValue,
UnloweredResource,
UnloweredMessage,
InvalidPayloadLayout,
EntryBlockHasParameters,
DuplicateBlockParameter,
@@ -138,6 +139,8 @@ fn validateInstruction(program: *const program_ir.Program, inst: instruction.Ins
return Error.InvalidGlobalInvocationId;
},
.load_buffer => |op| {
if (program.properties.messages_lowered)
return Error.UnloweredMessage;
try validateBufferReference(program, op.buffer);
try validateDestination(program, op.destination);
try validateBufferOffset(program, op.byte_offset);
@@ -145,12 +148,26 @@ fn validateInstruction(program: *const program_ir.Program, inst: instruction.Ins
return Error.InvalidBufferAccess;
},
.store_buffer => |op| {
if (program.properties.messages_lowered)
return Error.UnloweredMessage;
try validateBufferReference(program, op.buffer);
try validateBufferOffset(program, op.byte_offset);
try validateSource(program, op.source);
if (!op.source.type.isInitialTargetType())
return Error.InvalidBufferAccess;
},
.surface_read => |op| {
try validateDestination(program, op.destination);
try validateBufferOffset(program, op.address);
if (!op.destination.type.isInitialTargetType())
return Error.InvalidBufferAccess;
},
.surface_write => |op| {
try validateBufferOffset(program, op.address);
try validateSource(program, op.data);
if (!op.data.type.isInitialTargetType())
return Error.InvalidBufferAccess;
},
.move => |op| {
try validateDestination(program, op.destination);
try validateSource(program, op.source);