glsl/glasm: Pass and use scaling parameters in shaders

This commit is contained in:
ReinUsesLisp 2021-07-31 03:04:08 -03:00 committed by Fernando Sahmkow
parent 4a512d6827
commit cfeb161c7e
9 changed files with 51 additions and 28 deletions

View file

@ -616,8 +616,8 @@ void EmitIsTextureScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& inde
if (!index.IsImmediate()) {
throw NotImplementedException("Non-constant texture rescaling");
}
UNIMPLEMENTED();
ctx.AddU1("{}=true;", inst);
const u32 image_index{index.U32()};
ctx.AddU1("{}=(ftou(scaling.x)&{})!=0;", inst, 1u << image_index);
}
void EmitBindlessImageSampleImplicitLod(EmitContext&) {