mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-24 18:20:05 +00:00
texture_pass: Fix wrong descriptor used with rectangle texture patching
This commit is contained in:
parent
8a79dd2d6c
commit
a7caa07fdd
@ -538,14 +538,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) {
|
||||
@ -662,6 +654,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user