mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 19:15:46 +00:00
OpenGL: Implement Fencing backend.
This commit is contained in:
parent
3d2b5222df
commit
802fabe3ab
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue