early-access version 2755

This commit is contained in:
pineappleEA
2022-06-03 11:18:18 +02:00
parent f02974468e
commit 9f4fe2571a
6 changed files with 189 additions and 8 deletions

View File

@@ -595,8 +595,8 @@ void Maxwell3D::DrawArrays() {
std::optional<u64> Maxwell3D::GetQueryResult() {
switch (regs.query.query_get.select) {
case Regs::QuerySelect::Zero:
return 0;
case Regs::QuerySelect::Payload:
return regs.query.query_sequence;
case Regs::QuerySelect::SamplesPassed:
// Deferred.
rasterizer->Query(regs.query.QueryAddress(), QueryType::SamplesPassed,

View File

@@ -93,7 +93,7 @@ public:
};
enum class QuerySelect : u32 {
Zero = 0,
Payload = 0,
TimeElapsed = 2,
TransformFeedbackPrimitivesGenerated = 11,
PrimitivesGenerated = 18,

View File

@@ -31,7 +31,8 @@ static void RunThread(std::stop_token stop_token, Core::System& system,
VideoCore::RasterizerInterface* const rasterizer = renderer.ReadRasterizer();
while (!stop_token.stop_requested()) {
CommandDataContainer next = state.queue.PopWait(stop_token);
CommandDataContainer next;
state.queue.Pop(next, stop_token);
if (stop_token.stop_requested()) {
break;
}

View File

@@ -10,7 +10,7 @@
#include <thread>
#include <variant>
#include "common/threadsafe_queue.h"
#include "common/bounded_threadsafe_queue.h"
#include "video_core/framebuffer_config.h"
namespace Tegra {
@@ -96,9 +96,9 @@ struct CommandDataContainer {
/// Struct used to synchronize the GPU thread
struct SynchState final {
using CommandQueue = Common::SPSCQueue<CommandDataContainer, true>;
using CommandQueue = Common::MPSCQueue<CommandDataContainer>;
std::mutex write_lock;
CommandQueue queue;
CommandQueue queue{512}; // size must be 2^n
u64 last_fence{};
std::atomic<u64> signaled_fence{};
std::condition_variable_any cv;