mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-21 11:46:59 +02:00
[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: https://git.eden-emu.dev/eden-emu/eden/pulls/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
|
||||
|
|
|
|||
|
|
@ -541,6 +541,12 @@ void EmitConvertF64U8(EmitContext& ctx, IR::Inst& inst, Register value);
|
|||
void EmitConvertF64U16(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitConvertF64U32(EmitContext& ctx, IR::Inst& inst, ScalarU32 value);
|
||||
void EmitConvertF64U64(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitConvertU16U32(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitConvertU32U16(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitConvertU8U32(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitConvertU32U8(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitConvertS32S8(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitConvertS32S16(EmitContext& ctx, IR::Inst& inst, Register value);
|
||||
void EmitBindlessImageSampleImplicitLod(EmitContext&);
|
||||
void EmitBindlessImageSampleExplicitLod(EmitContext&);
|
||||
void EmitBindlessImageSampleDrefImplicitLod(EmitContext&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue