Vulkan: Build a yarn::Scheduler and pass it down to the vk::Queue.
Nothing is actually scheduled, but is a first step towards using yarn.
As yarn is now actually used by SwiftShader, drop the BUILD_YARN build
flags, as failing to build yarn would result in linker errors.
Bug: b/139142453
Change-Id: Ibd9a69f72a248f58a62bb41eeb196c4647876e82
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35153
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Vulkan/VkDevice.hpp b/src/Vulkan/VkDevice.hpp
index 809ef2f..24ed2c2 100644
--- a/src/Vulkan/VkDevice.hpp
+++ b/src/Vulkan/VkDevice.hpp
@@ -21,6 +21,11 @@
#include <memory>
#include <mutex>
+namespace yarn
+{
+ class Scheduler;
+}
+
namespace sw
{
class Blitter;
@@ -37,7 +42,7 @@
public:
static constexpr VkSystemAllocationScope GetAllocationScope() { return VK_SYSTEM_ALLOCATION_SCOPE_DEVICE; }
- Device(const VkDeviceCreateInfo* pCreateInfo, void* mem, PhysicalDevice *physicalDevice, const VkPhysicalDeviceFeatures *enabledFeatures);
+ Device(const VkDeviceCreateInfo* pCreateInfo, void* mem, PhysicalDevice *physicalDevice, const VkPhysicalDeviceFeatures *enabledFeatures, yarn::Scheduler *scheduler);
void destroy(const VkAllocationCallbacks* pAllocator);
static size_t ComputeRequiredAllocationSize(const VkDeviceCreateInfo* pCreateInfo);