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 @@ ...@@ -20,11 +20,10 @@
namespace vk 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() void Query::reset()
{ {
ASSERT(wg.count() == 0);
finished.clear(); finished.clear();
auto prevState = state.exchange(UNAVAILABLE); auto prevState = state.exchange(UNAVAILABLE);
ASSERT(prevState != ACTIVE); ASSERT(prevState != ACTIVE);
......
...@@ -15,9 +15,11 @@ ...@@ -15,9 +15,11 @@
#ifndef VK_QUERY_POOL_HPP_ #ifndef VK_QUERY_POOL_HPP_
#define VK_QUERY_POOL_HPP_ #define VK_QUERY_POOL_HPP_
#include "System/Synchronization.hpp"
#include "VkObject.hpp" #include "VkObject.hpp"
#include "marl/event.h"
#include "marl/waitgroup.h"
#include <atomic> #include <atomic>
#include <condition_variable> #include <condition_variable>
#include <mutex> #include <mutex>
...@@ -81,8 +83,8 @@ public: ...@@ -81,8 +83,8 @@ public:
void add(int64_t val); void add(int64_t val);
private: private:
sw::WaitGroup wg; marl::WaitGroup wg;
sw::Event finished; marl::Event finished;
std::atomic<State> state; std::atomic<State> state;
std::atomic<VkQueryType> type; std::atomic<VkQueryType> type;
std::atomic<int64_t> value; 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