From e69881033e6b2419d627dd239820049c072c0755 Mon Sep 17 00:00:00 2001 From: Frodo Baggins Date: Fri, 11 Oct 2024 12:17:19 -0700 Subject: [PATCH] fix after rebase + squash --- .../ir/passes/resource_tracking_pass.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp index 795501a89..6c8809cf0 100644 --- a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp +++ b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp @@ -420,18 +420,16 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, if (handle.IsImmediate()) { LOG_WARNING(Render_Vulkan, "Inline sampler detected"); return descriptors.Add(SamplerResource{ - .sgpr_base = std::numeric_limits::max(), - .dword_offset = 0, + .sharp_idx = std::numeric_limits::max(), .inline_sampler = AmdGpu::Sampler{.raw0 = handle.U32()}, }); } // Normal sampler resource. const auto ssharp_handle = handle.InstRecursive(); const auto& [ssharp_ud, disable_aniso] = TryDisableAnisoLod0(ssharp_handle); - const auto ssharp = TrackSharp(ssharp_ud); + const auto ssharp = TrackSharp(ssharp_ud, info); return descriptors.Add(SamplerResource{ - .sgpr_base = ssharp.sgpr_base, - .dword_offset = ssharp.dword_offset, + .sharp_idx = ssharp, .associated_image = image_binding, .disable_aniso = disable_aniso, }); @@ -594,8 +592,7 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, inst.ReplaceUsesWith(new_inst); } -void PatchImageInstruction(IR::Block& block, IR::Inst& inst, Info& info, Descriptors& descriptors, - Shader::FlatSharpBuffer sharp_buf) { +void PatchImageInstruction(IR::Block& block, IR::Inst& inst, Info& info, Descriptors& descriptors) { const auto pred = [](const IR::Inst* inst) -> std::optional { const auto opcode = inst->GetOpcode(); if (opcode == IR::Opcode::CompositeConstructU32x2 || // IMAGE_SAMPLE (image+sampler)