forked from eden-emu/eden
[spirv] new castings for int8/int16/etc (#86)
This commit introduces extended support for low-precision integer casting (int8, int16) in the SPIR-V shader generation pipeline, improving compatibility and performance across both Android and PC platforms. Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-on: eden-emu/eden#86 Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
a974c5a29c
commit
7962c81738
10 changed files with 178 additions and 2 deletions
|
@ -225,4 +225,28 @@ void EmitConvertF64U64(EmitContext& ctx, IR::Inst& inst, Register value) {
|
|||
Convert(ctx, inst, value, "F64", "U64", true);
|
||||
}
|
||||
|
||||
void EmitConvertU16U32(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||
Convert(ctx, inst, value, "U32", "U16", false);
|
||||
}
|
||||
|
||||
void EmitConvertU32U16(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||
Convert(ctx, inst, value, "U16", "U32", false);
|
||||
}
|
||||
|
||||
void EmitConvertU8U32(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||
Convert(ctx, inst, value, "U32", "U8", false);
|
||||
}
|
||||
|
||||
void EmitConvertU32U8(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||
Convert(ctx, inst, value, "U8", "U32", false);
|
||||
}
|
||||
|
||||
void EmitConvertS32S8(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||
Convert(ctx, inst, value, "S8", "S32", false);
|
||||
}
|
||||
|
||||
void EmitConvertS32S16(EmitContext& ctx, IR::Inst& inst, Register value) {
|
||||
Convert(ctx, inst, value, "S16", "S32", false);
|
||||
}
|
||||
|
||||
} // namespace Shader::Backend::GLASM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue