Commit 0fde10b2 by Ben Clayton

VkQueryPool: Migrate from sw sync to marl

Removes the last use of sw::Event in Vulkan. Bug: b/140546382 Change-Id: I5de63c52e35756dc6d7e4c6cbb77669ea3925d79 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38208Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 951d48df
......@@ -20,11 +20,10 @@
namespace vk
{
Query::Query() : finished(sw::Event::ClearMode::Manual), state(UNAVAILABLE), type(INVALID_TYPE), value(0) {}
Query::Query() : finished(marl::Event::Mode::Manual), state(UNAVAILABLE), type(INVALID_TYPE), value(0) {}
void Query::reset()
{
ASSERT(wg.count() == 0);
finished.clear();
auto prevState = state.exchange(UNAVAILABLE);
ASSERT(prevState != ACTIVE);
......
......@@ -15,9 +15,11 @@
#ifndef VK_QUERY_POOL_HPP_
#define VK_QUERY_POOL_HPP_
#include "System/Synchronization.hpp"
#include "VkObject.hpp"
#include "marl/event.h"
#include "marl/waitgroup.h"
#include <atomic>
#include <condition_variable>
#include <mutex>
......@@ -81,8 +83,8 @@ public:
void add(int64_t val);
private:
sw::WaitGroup wg;
sw::Event finished;
marl::WaitGroup wg;
marl::Event finished;
std::atomic<State> state;
std::atomic<VkQueryType> type;
std::atomic<int64_t> value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment