diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index a4eae8e7a4..2abb8e1d59 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -165,12 +165,12 @@ Liverpool::Task Liverpool::ProcessCeUpdate(std::span ccb) { const auto* indirect_buffer = reinterpret_cast(header); auto task = ProcessCeUpdate({indirect_buffer->Address(), indirect_buffer->ib_size}); + task.handle.resume(); while (!task.handle.done()) { - task.handle.resume(); - TracyFiberLeave; co_yield {}; TracyFiberEnter(ccb_task_name); + task.handle.resume(); }; break; } @@ -583,6 +583,8 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::spansrc_sel == DmaDataSrc::Gds && dma_data->dst_sel == DmaDataDst::Memory) { // LOG_WARNING(Render_Vulkan, "GDS memory read"); + const u32 data = rasterizer->ReadDataFromGds(dma_data->src_addr_lo); + std::memcpy(dma_data->DstAddress(), &data, sizeof(data)); } else if (dma_data->src_sel == DmaDataSrc::Memory && dma_data->dst_sel == DmaDataDst::Memory) { rasterizer->InlineData(dma_data->DstAddress(), @@ -667,6 +669,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span acb, int vqid) { TracyFiberEnter(acb_task_name); + regs.cs_program = mapped_queues[vqid].cs_state; auto base_addr = reinterpret_cast(acb.data()); while (!acb.empty()) { @@ -689,12 +692,14 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, int vqid) { const auto* indirect_buffer = reinterpret_cast(header); auto task = ProcessCompute( {indirect_buffer->Address(), indirect_buffer->ib_size}, vqid); + task.handle.resume(); while (!task.handle.done()) { - task.handle.resume(); - + mapped_queues[vqid].cs_state = regs.cs_program; TracyFiberLeave; co_yield {}; TracyFiberEnter(acb_task_name); + regs.cs_program = mapped_queues[vqid].cs_state; + task.handle.resume(); }; break; } @@ -716,6 +721,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, int vqid) { } else if (dma_data->src_sel == DmaDataSrc::Gds && dma_data->dst_sel == DmaDataDst::Memory) { // LOG_WARNING(Render_Vulkan, "GDS memory read"); + const u32 data = rasterizer->ReadDataFromGds(dma_data->src_addr_lo); + std::memcpy(dma_data->DstAddress(), &data, sizeof(data)); } else if (dma_data->src_sel == DmaDataSrc::Memory && dma_data->dst_sel == DmaDataDst::Memory) { rasterizer->InlineData(dma_data->DstAddress(), @@ -789,6 +796,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, int vqid) { acb = NextPacket(acb, header->type3.NumWords() + 1); } + LOG_WARNING(Render_Vulkan, "Done compute queue {}", vqid); + mapped_queues[vqid].cs_state = regs.cs_program; TracyFiberLeave; } @@ -847,7 +856,7 @@ void Liverpool::SubmitGfx(std::span dcb, std::span ccb) { } void Liverpool::SubmitAsc(u32 vqid, std::span acb) { - ASSERT_MSG(vqid >= 0 && vqid < NumTotalQueues, "Invalid virtual ASC queue index"); + ASSERT_MSG(vqid > 0 && vqid < NumTotalQueues, "Invalid virtual ASC queue index"); auto& queue = mapped_queues[vqid]; const auto& task = ProcessCompute(acb, vqid);