This commit is contained in:
GPUCode 2024-03-01 23:14:35 +13:00 committed by GitHub
commit 8fdace9e9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 8 deletions

View File

@ -558,14 +558,6 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
flags.type.Assign(ReadTextureType(env, cbuf));
inst->SetFlags(flags);
break;
case IR::Opcode::ImageSampleImplicitLod:
if (flags.type != TextureType::Color2D) {
break;
}
if (ReadTextureType(env, cbuf) == TextureType::Color2DRect) {
PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst);
}
break;
case IR::Opcode::ImageFetch:
if (flags.type == TextureType::Color2D || flags.type == TextureType::Color2DRect ||
flags.type == TextureType::ColorArray2D) {
@ -685,6 +677,19 @@ void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo
PatchTexelFetch(*texture_inst.block, *texture_inst.inst, pixel_format);
}
}
switch (inst->GetOpcode()) {
case IR::Opcode::ImageSampleImplicitLod:
if (flags.type != TextureType::Color2D) {
break;
}
if (ReadTextureType(env, cbuf) == TextureType::Color2DRect) {
PatchImageSampleImplicitLod(*texture_inst.block, *texture_inst.inst);
}
break;
default:
break;
}
}
}