aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/vk
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/vk')
-rw-r--r--include/gpu/vk/GrVkBackendContext.h14
-rw-r--r--include/gpu/vk/GrVkInterface.h21
2 files changed, 16 insertions, 19 deletions
diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h
index 6d45a2045d..8f4ba04584 100644
--- a/include/gpu/vk/GrVkBackendContext.h
+++ b/include/gpu/vk/GrVkBackendContext.h
@@ -18,6 +18,17 @@
struct GrVkInterface;
+enum GrVkExtensionFlags {
+ kEXT_debug_report_GrVkExtensionFlag = 0x0001,
+ kNV_glsl_shader_GrVkExtensionFlag = 0x0002,
+};
+
+enum GrVkFeatureFlags {
+ kGeometryShader_GrVkFeatureFlag = 0x0001,
+ kDualSrcBlend_GrVkFeatureFlag = 0x0002,
+ kSampleRateShading_GrVkFeatureFlag = 0x0004,
+};
+
// The BackendContext contains all of the base Vulkan objects needed by the GrVkGpu. The assumption
// is that the client will set these up and pass them to the GrVkGpu constructor. The VkDevice
// created must support at least one graphics queue, which is passed in as well.
@@ -30,6 +41,9 @@ struct GrVkBackendContext : public SkRefCnt {
VkDevice fDevice;
VkQueue fQueue;
uint32_t fQueueFamilyIndex;
+ uint32_t fMinAPIVersion;
+ uint32_t fExtensions;
+ uint32_t fFeatures;
SkAutoTUnref<const GrVkInterface> fInterface;
// Helper function to create the default Vulkan objects needed by the GrVkGpu object
diff --git a/include/gpu/vk/GrVkInterface.h b/include/gpu/vk/GrVkInterface.h
index cfab979bd7..e36bfb1a02 100644
--- a/include/gpu/vk/GrVkInterface.h
+++ b/include/gpu/vk/GrVkInterface.h
@@ -10,8 +10,6 @@
#include "SkRefCnt.h"
-#include "GrVkExtensions.h"
-
#include "vulkan/vulkan.h"
////////////////////////////////////////////////////////////////////////////////
@@ -26,8 +24,8 @@ struct GrVkInterface;
/**
* Creates a GrVkInterface.
*/
-const GrVkInterface* GrVkCreateInterface(VkInstance instance, VkPhysicalDevice physDev,
- VkDevice device);
+const GrVkInterface* GrVkCreateInterface(VkInstance instance, VkDevice device,
+ uint32_t extensionFlags);
/**
@@ -57,21 +55,6 @@ public:
// function pointers have been initialized for Vulkan version.
bool validate() const;
- GrVkExtensions fExtensions;
-
- bool hasInstanceExtension(const char ext[]) const {
- return fExtensions.hasInstanceExtension(ext);
- }
- bool hasDeviceExtension(const char ext[]) const {
- return fExtensions.hasDeviceExtension(ext);
- }
- bool hasInstanceLayer(const char ext[]) const {
- return fExtensions.hasInstanceLayer(ext);
- }
- bool hasDeviceLayer(const char ext[]) const {
- return fExtensions.hasDeviceLayer(ext);
- }
-
/**
* The function pointers are in a struct so that we can have a compiler generated assignment
* operator.