format source files

This commit is contained in:
nmzik
2026-07-18 08:56:38 +02:00
parent 6c1bd853ac
commit 601c82a031
53 changed files with 1622 additions and 1573 deletions
@@ -913,9 +913,11 @@ uint32_t AddressSourceCount(const IR::Instruction& inst, uint32_t first_src);
bool IsFormattedBufferComponent(const IR::Instruction& inst);
Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state, const IR::Instruction& inst);
Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state,
const IR::Instruction& inst);
IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst, Prospero::BufferFormat format);
IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst,
Prospero::BufferFormat format);
uint32_t EmitTBufferBitcastF32ToU32(EmitterState* state, uint32_t value);
@@ -953,7 +955,7 @@ bool EmitTypedTBufferLoad(EmitterState* state, const IR::Instruction& inst,
bool EmitFormattedBufferLoad(EmitterState* state, const IR::Instruction& inst);
uint32_t FormattedBufferDwordStoreComponentCount(Prospero::BufferFormat format,
uint32_t opcode_components);
uint32_t opcode_components);
bool EmitBufferIntegerFormatStore(EmitterState* state, const IR::Instruction& inst);
@@ -726,13 +726,16 @@ bool IsFormattedBufferComponent(const IR::Instruction& inst) {
inst.memory.data_dwords == 1u;
}
Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state, const IR::Instruction& inst) {
Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state,
const IR::Instruction& inst) {
return inst.memory.typed
? Format::DecodeTBufferFormat(inst.memory.data_format, inst.memory.number_format)
: static_cast<Prospero::BufferFormat>(StorageBufferFormat(state, inst.memory, inst.pc));
: static_cast<Prospero::BufferFormat>(
StorageBufferFormat(state, inst.memory, inst.pc));
}
IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst, Prospero::BufferFormat format) {
IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst,
Prospero::BufferFormat format) {
auto rebased = inst;
if (inst.memory.typed || inst.memory.component_index == 0u) {
return rebased;
@@ -972,7 +975,7 @@ bool EmitFormattedBufferLoad(EmitterState* state, const IR::Instruction& inst) {
}
uint32_t FormattedBufferDwordStoreComponentCount(Prospero::BufferFormat format,
uint32_t opcode_components) {
uint32_t opcode_components) {
switch (format) {
case Prospero::BufferFormat::k32UInt:
case Prospero::BufferFormat::k32SInt: