aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/amber/amber_vulkan.h28
-rw-r--r--include/amber/recipe.h13
2 files changed, 39 insertions, 2 deletions
diff --git a/include/amber/amber_vulkan.h b/include/amber/amber_vulkan.h
index 084a2c9..1f38ab1 100644
--- a/include/amber/amber_vulkan.h
+++ b/include/amber/amber_vulkan.h
@@ -15,14 +15,38 @@
#ifndef AMBER_AMBER_VULKAN_H_
#define AMBER_AMBER_VULKAN_H_
+#include <limits>
+#include <string>
+#include <vector>
+
+#include "amber/amber.h"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#include "vulkan/vulkan.h"
+#pragma clang diagnostic pop
namespace amber {
/// Configuration for the Vulkan Engine.
struct VulkanEngineConfig : public EngineConfig {
- /// The VkDevice to use for the tests.
- VkDevice device;
+ /// The VkPhysicalDevice to use.
+ VkPhysicalDevice physical_device = VK_NULL_HANDLE;
+
+ /// Physical device features available for |physical_device|.
+ VkPhysicalDeviceFeatures available_features = {};
+
+ /// Physical device extensions available for |physical_device|.
+ std::vector<std::string> available_extensions;
+
+ /// The given queue family index to use.
+ uint32_t queue_family_index = std::numeric_limits<uint32_t>::max();
+
+ /// The VkDevice to use.
+ VkDevice device = VK_NULL_HANDLE;
+
+ /// The VkQueue to use.
+ VkQueue queue = VK_NULL_HANDLE;
};
} // namespace amber
diff --git a/include/amber/recipe.h b/include/amber/recipe.h
index 3dd932c..d33c479 100644
--- a/include/amber/recipe.h
+++ b/include/amber/recipe.h
@@ -16,6 +16,7 @@
#define AMBER_RECIPE_H_
#include <memory>
+#include <string>
#include <utility>
#include <vector>
@@ -31,6 +32,12 @@ class RecipeImpl {
/// Retrieves information on all the shaders in the given recipe.
virtual std::vector<ShaderInfo> GetShaderInfo() const = 0;
+ /// Returns required features in the given recipe.
+ virtual std::vector<std::string> GetRequiredFeatures() const = 0;
+
+ /// Returns required extensions in the given recipe.
+ virtual std::vector<std::string> GetRequiredExtensions() const = 0;
+
protected:
RecipeImpl();
};
@@ -47,6 +54,12 @@ class Recipe {
RecipeImpl* GetImpl() const { return impl_.get(); }
void SetImpl(std::unique_ptr<RecipeImpl> impl) { impl_ = std::move(impl); }
+ /// Returns required features in the given recipe.
+ std::vector<std::string> GetRequiredFeatures() const;
+
+ /// Returns required extensions in the given recipe.
+ std::vector<std::string> GetRequiredExtensions() const;
+
private:
std::unique_ptr<RecipeImpl> impl_;
};