diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-08-27 02:58:00 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-08-27 04:26:22 +0200 |
commit | 115792158d3ac4ca746d1775f2381e8f8dd18582 (patch) | |
tree | fec8995dd2a887068625e9d1278d0562bee6a8cb /src/video_core/engines/kepler_compute.cpp | |
parent | Shader Recompiler: Auto stub special registers and dump pipelines on exception. (diff) | |
download | yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.gz yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.bz2 yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.lz yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.xz yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.zst yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.zip |
Diffstat (limited to 'src/video_core/engines/kepler_compute.cpp')
-rw-r--r-- | src/video_core/engines/kepler_compute.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/video_core/engines/kepler_compute.cpp b/src/video_core/engines/kepler_compute.cpp index a38d9528a..cd61ab222 100644 --- a/src/video_core/engines/kepler_compute.cpp +++ b/src/video_core/engines/kepler_compute.cpp @@ -43,16 +43,33 @@ void KeplerCompute::CallMethod(u32 method, u32 method_argument, bool is_last_cal switch (method) { case KEPLER_COMPUTE_REG_INDEX(exec_upload): { + UploadInfo info{.upload_address = upload_address, + .exec_address = upload_state.ExecTargetAddress(), + .copy_size = upload_state.GetUploadSize()}; + uploads.push_back(info); upload_state.ProcessExec(regs.exec_upload.linear != 0); break; } case KEPLER_COMPUTE_REG_INDEX(data_upload): { + upload_address = current_dma_segment; upload_state.ProcessData(method_argument, is_last_call); break; } - case KEPLER_COMPUTE_REG_INDEX(launch): + case KEPLER_COMPUTE_REG_INDEX(launch): { + const GPUVAddr launch_desc_loc = regs.launch_desc_loc.Address(); + + for (auto& data : uploads) { + const GPUVAddr offset = data.exec_address - launch_desc_loc; + if (offset / sizeof(u32) == LAUNCH_REG_INDEX(grid_dim_x) && + memory_manager.IsMemoryDirty(data.upload_address, data.copy_size)) { + indirect_compute = {data.upload_address}; + } + } + uploads.clear(); ProcessLaunch(); + indirect_compute = std::nullopt; break; + } default: break; } @@ -62,6 +79,7 @@ void KeplerCompute::CallMultiMethod(u32 method, const u32* base_start, u32 amoun u32 methods_pending) { switch (method) { case KEPLER_COMPUTE_REG_INDEX(data_upload): + upload_address = current_dma_segment; upload_state.ProcessData(base_start, amount); return; default: |