Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/shader_recompiler/ir/passes/resource_tracking_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading