mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
vk: Fixup
This commit is contained in:
parent
24f4c92759
commit
42851a93d4
1 changed files with 10 additions and 1 deletions
|
@ -269,7 +269,16 @@ namespace vk
|
||||||
m_data_length = data_length;
|
m_data_length = data_length;
|
||||||
|
|
||||||
const auto num_bytes_per_invocation = optimal_group_size * kernel_size * 4;
|
const auto num_bytes_per_invocation = optimal_group_size * kernel_size * 4;
|
||||||
const auto num_invocations = align(data_length, 256) / num_bytes_per_invocation;
|
const auto num_bytes_to_process = align(data_length, num_bytes_per_invocation);
|
||||||
|
const auto num_invocations = num_bytes_to_process / num_bytes_per_invocation;
|
||||||
|
|
||||||
|
if (num_bytes_to_process > data->size())
|
||||||
|
{
|
||||||
|
// Technically robust buffer access should keep the driver from crashing in OOB situations
|
||||||
|
LOG_ERROR(RSX, "Inadequate buffer length submitted for a compute operation."
|
||||||
|
"Required=%d bytes, Available=%d bytes", num_bytes_to_process, data->size());
|
||||||
|
}
|
||||||
|
|
||||||
compute_task::run(cmd, num_invocations);
|
compute_task::run(cmd, num_invocations);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue