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 c42a6143a5
commit ec6fc5fe78
10 changed files with 276 additions and 70 deletions

View File

@ -177,14 +177,13 @@ void Impl(TranslatorVisitor& v, u64 insn, bool aoffi, Blod blod, bool lc,
const IR::Value sample{[&]() -> IR::Value {
if (tex.dc == 0) {
if (HasExplicitLod(blod)) {
return v.ir.ImageSampleExplicitLod(handle, coords, lod, offset, lod_clamp, info);
return v.ir.ImageSampleExplicitLod(handle, coords, lod, offset, info);
} else {
return v.ir.ImageSampleImplicitLod(handle, coords, lod, offset, lod_clamp, info);
}
}
if (HasExplicitLod(blod)) {
return v.ir.ImageSampleDrefExplicitLod(handle, coords, dref, lod, offset, lod_clamp,
info);
return v.ir.ImageSampleDrefExplicitLod(handle, coords, dref, lod, offset, info);
} else {
return v.ir.ImageSampleDrefImplicitLod(handle, coords, dref, lod, offset, lod_clamp,
info);