Add check to see if first instruction is valid in the next buffer to avoid false positives

This commit is contained in:
kalaposfos13 2025-03-24 13:22:26 +01:00
parent ebcd42aac3
commit e7814f429d

View File

@ -757,12 +757,14 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
compute_cutoff_end_to_prepend[vqid].size(); compute_cutoff_end_to_prepend[vqid].size();
PM4Header possible_next_command = std::bit_cast<PM4Header>(acb[remainder]); PM4Header possible_next_command = std::bit_cast<PM4Header>(acb[remainder]);
if (acb.size() == remainder || possible_next_command.type == 3) { if (acb.size() == remainder || possible_next_command.type == 3) {
std::copy(acb.data(), acb.data() + remainder, if (acb.data()[0].type != 3) {
std::back_inserter(compute_cutoff_end_to_prepend[vqid])); std::copy(acb.data(), acb.data() + remainder,
std::back_inserter(compute_cutoff_end_to_prepend[vqid]));
use_split_instruction = true; use_split_instruction = true;
LOG_INFO(Render_Vulkan, "Start of buffer 2: {}", fmt::ptr(acb.data())); LOG_INFO(Render_Vulkan, "Start of buffer 2: {}", fmt::ptr(acb.data()));
LOG_INFO(Render_Vulkan, "Executing split command!"); LOG_INFO(Render_Vulkan, "Executing split command!");
}
} else { } else {
LOG_INFO(Render_Vulkan, LOG_INFO(Render_Vulkan,
"The buffer wasn't split, the next command would have been type: " "The buffer wasn't split, the next command would have been type: "