IssueDraw failing in the backend does not mean we need to stop processing commands

This commit is contained in:
Dr. Chat 2016-10-21 18:14:24 -05:00
parent 21a190b7a9
commit 26d81abf52
1 changed files with 22 additions and 6 deletions

View File

@ -252,6 +252,7 @@ void CommandProcessor::WriteRegister(uint32_t index, uint32_t value) {
return;
}
// 0x1844 - pointer to frontbuffer
regs->values[index].u32 = value;
if (!regs->GetRegisterInfo(index)) {
XELOGW("GPU: Write to unknown register (%.4X = %.8X)", index, value);
@ -290,8 +291,8 @@ void CommandProcessor::MakeCoherent() {
RegisterFile* regs = register_file_;
auto status_host = regs->values[XE_GPU_REG_COHER_STATUS_HOST].u32;
// auto base_host = regs->values[XE_GPU_REG_COHER_BASE_HOST].u32;
// auto size_host = regs->values[XE_GPU_REG_COHER_SIZE_HOST].u32;
auto base_host = regs->values[XE_GPU_REG_COHER_BASE_HOST].u32;
auto size_host = regs->values[XE_GPU_REG_COHER_SIZE_HOST].u32;
if (!(status_host & 0x80000000ul)) {
return;
@ -649,6 +650,7 @@ bool CommandProcessor::ExecutePacketType3(RingBuffer* reader, uint32_t packet) {
default:
XELOGGPU("Unimplemented GPU OPCODE: 0x%.2X\t\tCOUNT: %d\n", opcode,
count);
assert_always();
reader->AdvanceRead(count * sizeof(uint32_t));
break;
}
@ -741,7 +743,9 @@ bool CommandProcessor::ExecutePacketType3_INDIRECT_BUFFER(RingBuffer* reader,
uint32_t count) {
// indirect buffer dispatch
uint32_t list_ptr = CpuToGpu(reader->Read<uint32_t>(true));
uint32_t list_length = reader->Read<uint32_t>(true) & 0xFFFFF;
uint32_t list_length = reader->Read<uint32_t>(true);
assert_zero(list_length & ~0xFFFFF);
list_length &= 0xFFFFF;
ExecuteIndirectBuffer(GpuToCpu(list_ptr), list_length);
return true;
}
@ -1080,8 +1084,14 @@ bool CommandProcessor::ExecutePacketType3_DRAW_INDX(RingBuffer* reader,
assert_always();
}
return IssueDraw(prim_type, index_count,
is_indexed ? &index_buffer_info : nullptr);
bool success = IssueDraw(prim_type, index_count,
is_indexed ? &index_buffer_info : nullptr);
if (!success) {
XELOGE("PM4_DRAW_INDX(%d, %d, %d): Failed in backend", index_count,
prim_type, src_sel);
}
return true;
}
bool CommandProcessor::ExecutePacketType3_DRAW_INDX_2(RingBuffer* reader,
@ -1099,7 +1109,13 @@ bool CommandProcessor::ExecutePacketType3_DRAW_INDX_2(RingBuffer* reader,
// uint32_t index_ptr = reader->ptr();
reader->AdvanceRead((count - 1) * sizeof(uint32_t));
return IssueDraw(prim_type, index_count, nullptr);
bool success = IssueDraw(prim_type, index_count, nullptr);
if (!success) {
XELOGE("PM4_DRAW_INDX_IMM(%d, %d): Failed in backend", index_count,
prim_type);
}
return true;
}
bool CommandProcessor::ExecutePacketType3_SET_CONSTANT(RingBuffer* reader,