Update emit_spirv_atomic.cpp

This commit is contained in:
DanielSvoboda 2024-07-28 14:39:02 -03:00 committed by GitHub
parent aa7c8ca2b6
commit 96ba76d859
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,14 +41,12 @@ Id EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords
return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicUMax); return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicUMax);
} }
Id EmitImageAtomicInc32(EmitContext&, IR::Inst*, u32, Id, Id) { Id EmitImageAtomicInc32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value) {
// TODO: This is not yet implemented return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicInc);
throw NotImplementedException("SPIR-V Instruction");
} }
Id EmitImageAtomicDec32(EmitContext&, IR::Inst*, u32, Id, Id) { Id EmitImageAtomicDec32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value) {
// TODO: This is not yet implemented return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicDec);
throw NotImplementedException("SPIR-V Instruction");
} }
Id EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value) { Id EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value) {
@ -67,4 +65,12 @@ Id EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id co
return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicExchange); return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicExchange);
} }
Id EmitBufferAtomicIMin32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value) {
return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicMin);
}
Id EmitBufferAtomicIMax32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value) {
return ImageAtomicU32(ctx, inst, handle, coords, value, &Sirit::Module::OpAtomicMax);
}
} // namespace Shader::Backend::SPIRV } // namespace Shader::Backend::SPIRV