OpenGL: Implement Fencing backend.
This commit is contained in:
parent
ed7e965712
commit
487379c593
12 changed files with 94 additions and 19 deletions
|
@ -397,14 +397,6 @@ void Maxwell3D::StampQueryResult(u64 payload, bool long_query) {
|
|||
}
|
||||
}
|
||||
|
||||
void Maxwell3D::ReleaseFences() {
|
||||
for (const auto pair : delay_fences) {
|
||||
const auto [addr, payload] = pair;
|
||||
memory_manager.Write<u32>(addr, static_cast<u32>(payload));
|
||||
}
|
||||
delay_fences.clear();
|
||||
}
|
||||
|
||||
void Maxwell3D::ProcessQueryGet() {
|
||||
// TODO(Subv): Support the other query units.
|
||||
ASSERT_MSG(regs.query.query_get.unit == Regs::QueryUnit::Crop,
|
||||
|
@ -412,10 +404,12 @@ void Maxwell3D::ProcessQueryGet() {
|
|||
|
||||
switch (regs.query.query_get.operation) {
|
||||
case Regs::QueryOperation::Release: {
|
||||
rasterizer.FlushCommands();
|
||||
rasterizer.SyncGuestHost();
|
||||
const u64 result = regs.query.query_sequence;
|
||||
delay_fences.emplace_back(regs.query.QueryAddress(), result);
|
||||
if (regs.query.query_get.fence == 1) {
|
||||
rasterizer.SignalFence(regs.query.QueryAddress(), static_cast<u32>(result));
|
||||
} else {
|
||||
StampQueryResult(result, regs.query.query_get.short_query == 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Regs::QueryOperation::Acquire:
|
||||
|
|
|
@ -1427,8 +1427,6 @@ public:
|
|||
Tables tables{};
|
||||
} dirty;
|
||||
|
||||
void ReleaseFences();
|
||||
|
||||
private:
|
||||
void InitializeRegisterDefaults();
|
||||
|
||||
|
@ -1469,8 +1467,6 @@ private:
|
|||
|
||||
std::array<u8, Regs::NUM_REGS> dirty_pointers{};
|
||||
|
||||
std::vector<std::pair<GPUVAddr, u64>> delay_fences;
|
||||
|
||||
/// Retrieves information about a specific TIC entry from the TIC buffer.
|
||||
Texture::TICEntry GetTICEntry(u32 tic_index) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue