glasm: Implement TEX and TEXS instructions

Remove lod clamp from texture instructions with lod, as this is not
needed (nor supported).
This commit is contained in:
ReinUsesLisp 2021-05-17 02:52:01 -03:00 committed by ameerj
parent 3d82b30141
commit 0b3a3f35e8
10 changed files with 276 additions and 70 deletions

View file

@ -38,7 +38,7 @@ void Store(EmitContext& ctx, const IR::Value& binding, ScalarU32 offset, ValueTy
void Load(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, ScalarU32 offset,
std::string_view size) {
const Register ret{ctx.reg_alloc.Define(inst)};
StorageOp(ctx, binding, offset, fmt::format("STORE.{} {},DC.x;", size, ret),
StorageOp(ctx, binding, offset, fmt::format("LOAD.{} {},DC.x;", size, ret),
fmt::format("MOV.U {},{{0,0,0,0}};", ret));
}
} // Anonymous namespace