mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-07-07 05:57:57 -05:00
VideoCore: Implement DispatchIndirect
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user