Compare commits

...

2 Commits

Author SHA1 Message Date
GPUCode
8fdace9e9c Merge a7caa07fdd into 15e6e48bef 2024-03-01 23:14:35 +13:00
GPUCode
a7caa07fdd texture_pass: Fix wrong descriptor used with rectangle texture patching 2023-12-08 00:21:11 +02:00

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;
}
}
}