This commit is contained in:
Marcin Mikołajczyk 2026-04-07 12:54:18 -07:00 committed by GitHub
commit b8430e47ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -226,7 +226,12 @@ Id EmitImageRead(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id lod
Id texel;
if (!texture.is_storage) {
const Id image = ctx.OpLoad(texture.image_type, texture.id);
operands.Add(spv::ImageOperandsMask::Lod, lod);
if (texture.view_type != AmdGpu::ImageType::Color2DMsaa) {
if (Sirit::ValidId(ms)) {
LOG_ERROR(Render_Recompiler, "image is not MS but ms operand is provided");
}
operands.Add(spv::ImageOperandsMask::Lod, lod);
}
texel = ctx.OpImageFetch(color_type, image, coords, operands.mask, operands.operands);
} else {
Id image_ptr = texture.id;

View File

@ -1051,7 +1051,7 @@ void PatchImageSampleArgs(IR::Block& block, IR::Inst& inst, Info& info,
auto texel = [&] -> IR::Value {
if (is_msaa) {
return ir.ImageRead(handle, coords, ir.Imm32(0U), ir.Imm32(0U), inst_info);
return ir.ImageRead(handle, coords, {}, ir.Imm32(0U), inst_info);
}
if (inst_info.is_gather) {
if (inst_info.is_depth) {