Remove OnCommandListEndCommand
Call rasterizer->ReleaseFences() directly
This commit is contained in:
parent
1f3e8d633a
commit
8551ac6008
@ -99,7 +99,7 @@ struct GPU::Impl {
|
|||||||
|
|
||||||
/// Signal the ending of command list.
|
/// Signal the ending of command list.
|
||||||
void OnCommandListEnd() {
|
void OnCommandListEnd() {
|
||||||
gpu_thread.OnCommandListEnd();
|
rasterizer->ReleaseFences();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Request a host GPU memory flush from the CPU.
|
/// Request a host GPU memory flush from the CPU.
|
||||||
|
@ -40,8 +40,6 @@ static void RunThread(std::stop_token stop_token, Core::System& system,
|
|||||||
scheduler.Push(submit_list->channel, std::move(submit_list->entries));
|
scheduler.Push(submit_list->channel, std::move(submit_list->entries));
|
||||||
} else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) {
|
} else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) {
|
||||||
renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr);
|
renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr);
|
||||||
} else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) {
|
|
||||||
rasterizer->ReleaseFences();
|
|
||||||
} else if (std::holds_alternative<GPUTickCommand>(next.data)) {
|
} else if (std::holds_alternative<GPUTickCommand>(next.data)) {
|
||||||
system.GPU().TickWork();
|
system.GPU().TickWork();
|
||||||
} else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) {
|
} else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) {
|
||||||
@ -110,10 +108,6 @@ void ThreadManager::FlushAndInvalidateRegion(VAddr addr, u64 size) {
|
|||||||
rasterizer->OnCPUWrite(addr, size);
|
rasterizer->OnCPUWrite(addr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadManager::OnCommandListEnd() {
|
|
||||||
PushCommand(OnCommandListEndCommand());
|
|
||||||
}
|
|
||||||
|
|
||||||
u64 ThreadManager::PushCommand(CommandData&& command_data, bool block) {
|
u64 ThreadManager::PushCommand(CommandData&& command_data, bool block) {
|
||||||
if (!is_async) {
|
if (!is_async) {
|
||||||
// In synchronous GPU mode, block the caller until the command has executed
|
// In synchronous GPU mode, block the caller until the command has executed
|
||||||
|
@ -77,16 +77,12 @@ struct FlushAndInvalidateRegionCommand final {
|
|||||||
u64 size;
|
u64 size;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Command called within the gpu, to schedule actions after a command list end
|
|
||||||
struct OnCommandListEndCommand final {};
|
|
||||||
|
|
||||||
/// Command to make the gpu look into pending requests
|
/// Command to make the gpu look into pending requests
|
||||||
struct GPUTickCommand final {};
|
struct GPUTickCommand final {};
|
||||||
|
|
||||||
using CommandData =
|
using CommandData =
|
||||||
std::variant<std::monostate, SubmitListCommand, SwapBuffersCommand, FlushRegionCommand,
|
std::variant<std::monostate, SubmitListCommand, SwapBuffersCommand, FlushRegionCommand,
|
||||||
InvalidateRegionCommand, FlushAndInvalidateRegionCommand, OnCommandListEndCommand,
|
InvalidateRegionCommand, FlushAndInvalidateRegionCommand, GPUTickCommand>;
|
||||||
GPUTickCommand>;
|
|
||||||
|
|
||||||
struct CommandDataContainer {
|
struct CommandDataContainer {
|
||||||
CommandDataContainer() = default;
|
CommandDataContainer() = default;
|
||||||
@ -134,8 +130,6 @@ public:
|
|||||||
/// Notify rasterizer that any caches of the specified region should be flushed and invalidated
|
/// Notify rasterizer that any caches of the specified region should be flushed and invalidated
|
||||||
void FlushAndInvalidateRegion(VAddr addr, u64 size);
|
void FlushAndInvalidateRegion(VAddr addr, u64 size);
|
||||||
|
|
||||||
void OnCommandListEnd();
|
|
||||||
|
|
||||||
void TickGPU();
|
void TickGPU();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user