shader: Properly scale image reads and add GL SPIR-V support
Thanks for everything!
This commit is contained in:
parent
fc9bb3c3fe
commit
e66d5b88a6
25 changed files with 228 additions and 77 deletions
|
@ -446,7 +446,7 @@ void EmitYDirection(EmitContext& ctx, IR::Inst& inst) {
|
|||
}
|
||||
|
||||
void EmitResolutionDownFactor(EmitContext& ctx, IR::Inst& inst) {
|
||||
ctx.AddF32("{}=scaling.y;", inst);
|
||||
ctx.AddF32("{}=scaling.z;", inst);
|
||||
}
|
||||
|
||||
void EmitLoadLocal(EmitContext& ctx, IR::Inst& inst, std::string_view word_offset) {
|
||||
|
|
|
@ -620,6 +620,14 @@ void EmitIsTextureScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& inde
|
|||
ctx.AddU1("{}=(ftou(scaling.x)&{})!=0;", inst, 1u << image_index);
|
||||
}
|
||||
|
||||
void EmitIsImageScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& index) {
|
||||
if (!index.IsImmediate()) {
|
||||
throw NotImplementedException("Non-constant texture rescaling");
|
||||
}
|
||||
const u32 image_index{index.U32()};
|
||||
ctx.AddU1("{}=(ftou(scaling.y)&{})!=0;", inst, 1u << image_index);
|
||||
}
|
||||
|
||||
void EmitBindlessImageSampleImplicitLod(EmitContext&) {
|
||||
NotImplemented();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue