Compare commits

...

2 Commits

Author SHA1 Message Date
GPUCode efc61abe98
Merge a7caa07fdd into dc94882c90 2024-02-27 18:50:43 +01:00
GPUCode a7caa07fdd texture_pass: Fix wrong descriptor used with rectangle texture patching 2023-12-08 00:21:11 +02:00
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;
}
}
}