diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrCaps.h | 10 | ||||
-rw-r--r-- | include/gpu/vk/GrVkBackendContext.h | 16 | ||||
-rw-r--r-- | include/gpu/vk/GrVkDefines.h | 128 | ||||
-rw-r--r-- | include/gpu/vk/GrVkInterface.h | 4 |
4 files changed, 9 insertions, 149 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 5579557e64..0b4c2e7ee5 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -126,14 +126,6 @@ public: bool reuseScratchTextures() const { return fReuseScratchTextures; } bool reuseScratchBuffers() const { return fReuseScratchBuffers; } - enum class WindowRectsSupport { - kNone, - kDrawOnly, - kDrawAndClear - }; - - WindowRectsSupport windowRectsSupport() const { return fWindowRectsSupport; } - /// maximum number of attribute values per vertex int maxVertexAttributes() const { return fMaxVertexAttributes; } @@ -242,8 +234,6 @@ protected: uint32_t fMapBufferFlags; int fBufferMapThreshold; - WindowRectsSupport fWindowRectsSupport; - int fMaxRenderTargetSize; int fMaxVertexAttributes; int fMaxTextureSize; diff --git a/include/gpu/vk/GrVkBackendContext.h b/include/gpu/vk/GrVkBackendContext.h index 4b93313a74..68791ba945 100644 --- a/include/gpu/vk/GrVkBackendContext.h +++ b/include/gpu/vk/GrVkBackendContext.h @@ -14,15 +14,13 @@ #include "vk/GrVkInterface.h" enum GrVkExtensionFlags { - kKHR_get_physical_device_properties2_GrVkExtensionFlag = 0x0001, - kEXT_debug_report_GrVkExtensionFlag = 0x0002, - kNV_glsl_shader_GrVkExtensionFlag = 0x0004, - kKHR_surface_GrVkExtensionFlag = 0x0008, - kEXT_discard_rectangles_GrVkExtensionFlag = 0x0010, - kKHR_swapchain_GrVkExtensionFlag = 0x0020, - kKHR_win32_surface_GrVkExtensionFlag = 0x0040, - kKHR_android_surface_GrVkExtensionFlag = 0x0080, - kKHR_xcb_surface_GrVkExtensionFlag = 0x0100, + kEXT_debug_report_GrVkExtensionFlag = 0x0001, + kNV_glsl_shader_GrVkExtensionFlag = 0x0002, + kKHR_surface_GrVkExtensionFlag = 0x0004, + kKHR_swapchain_GrVkExtensionFlag = 0x0008, + kKHR_win32_surface_GrVkExtensionFlag = 0x0010, + kKHR_android_surface_GrVkExtensionFlag = 0x0020, + kKHR_xcb_surface_GrVkExtensionFlag = 0x0040, }; enum GrVkFeatureFlags { diff --git a/include/gpu/vk/GrVkDefines.h b/include/gpu/vk/GrVkDefines.h index 5873f9924f..0bc6fb0343 100644 --- a/include/gpu/vk/GrVkDefines.h +++ b/include/gpu/vk/GrVkDefines.h @@ -38,130 +38,6 @@ #error "Vulkan header version is too low" #endif -#ifndef VK_KHR_get_physical_device_properties2 - -// Installed Vulkan SDK is too old to define VK_KHR_get_physical_device_properties2: define it here. -#define VK_KHR_get_physical_device_properties2 1 -#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 -#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" - -typedef struct VkPhysicalDeviceFeatures2KHR { - VkStructureType sType; - void* pNext; - VkPhysicalDeviceFeatures features; -} VkPhysicalDeviceFeatures2KHR; - -typedef struct VkPhysicalDeviceProperties2KHR { - VkStructureType sType; - void* pNext; - VkPhysicalDeviceProperties properties; -} VkPhysicalDeviceProperties2KHR; - -typedef struct VkFormatProperties2KHR { - VkStructureType sType; - void* pNext; - VkFormatProperties formatProperties; -} VkFormatProperties2KHR; - -typedef struct VkImageFormatProperties2KHR { - VkStructureType sType; - void* pNext; - VkImageFormatProperties imageFormatProperties; -} VkImageFormatProperties2KHR; - -typedef struct VkPhysicalDeviceImageFormatInfo2KHR { - VkStructureType sType; - const void* pNext; - VkFormat format; - VkImageType type; - VkImageTiling tiling; - VkImageUsageFlags usage; - VkImageCreateFlags flags; -} VkPhysicalDeviceImageFormatInfo2KHR; - -typedef struct VkQueueFamilyProperties2KHR { - VkStructureType sType; - void* pNext; - VkQueueFamilyProperties queueFamilyProperties; -} VkQueueFamilyProperties2KHR; - -typedef struct VkPhysicalDeviceMemoryProperties2KHR { - VkStructureType sType; - void* pNext; - VkPhysicalDeviceMemoryProperties memoryProperties; -} VkPhysicalDeviceMemoryProperties2KHR; - -typedef struct VkSparseImageFormatProperties2KHR { - VkStructureType sType; - void* pNext; - VkSparseImageFormatProperties properties; -} VkSparseImageFormatProperties2KHR; - -typedef struct VkPhysicalDeviceSparseImageFormatInfo2KHR { - VkStructureType sType; - const void* pNext; - VkFormat format; - VkImageType type; - VkSampleCountFlagBits samples; - VkImageUsageFlags usage; - VkImageTiling tiling; -} VkPhysicalDeviceSparseImageFormatInfo2KHR; - - -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR* pFeatures); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR* pProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR* pFormatProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, VkImageFormatProperties2KHR* pImageFormatProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR* pQueueFamilyProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2KHR* pProperties); - -static constexpr VkStructureType VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = (VkStructureType) 1000059001; - -#endif // !VK_KHR_get_physical_device_properties2 - -#ifndef VK_EXT_discard_rectangles - -// Installed Vulkan SDK is too old to define discard rectangles: define them here. -#define VK_EXT_discard_rectangles 1 -#define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 -#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" - -typedef enum VkDiscardRectangleModeEXT { - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, - VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, - VK_DISCARD_RECTANGLE_MODE_BEGIN_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT, - VK_DISCARD_RECTANGLE_MODE_END_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT, - VK_DISCARD_RECTANGLE_MODE_RANGE_SIZE_EXT = (VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT + 1), - VK_DISCARD_RECTANGLE_MODE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDiscardRectangleModeEXT; - -typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; - -typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT { - VkStructureType sType; - const void* pNext; - uint32_t maxDiscardRectangles; -} VkPhysicalDeviceDiscardRectanglePropertiesEXT; - -typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkPipelineDiscardRectangleStateCreateFlagsEXT flags; - VkDiscardRectangleModeEXT discardRectangleMode; - uint32_t discardRectangleCount; - const VkRect2D* pDiscardRectangles; -} VkPipelineDiscardRectangleStateCreateInfoEXT; - - -typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); - -static constexpr VkStructureType VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = (VkStructureType) 1000099000; -static constexpr VkStructureType VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = (VkStructureType) 1000099001; -static constexpr VkDynamicState VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = (VkDynamicState) 1000099000; - -#endif // !VK_EXT_discard_rectangles - -#endif // SK_VULKAN +#endif -#endif // GrVkDefines_DEFINED +#endif diff --git a/include/gpu/vk/GrVkInterface.h b/include/gpu/vk/GrVkInterface.h index a56df31cb2..05ce561829 100644 --- a/include/gpu/vk/GrVkInterface.h +++ b/include/gpu/vk/GrVkInterface.h @@ -203,13 +203,9 @@ public: VkPtr<PFN_vkCmdEndRenderPass> fCmdEndRenderPass; VkPtr<PFN_vkCmdExecuteCommands> fCmdExecuteCommands; - VkPtr<PFN_vkGetPhysicalDeviceProperties2KHR> fGetPhysicalDeviceProperties2KHR; - VkPtr<PFN_vkCreateDebugReportCallbackEXT> fCreateDebugReportCallbackEXT; VkPtr<PFN_vkDebugReportMessageEXT> fDebugReportMessageEXT; VkPtr<PFN_vkDestroyDebugReportCallbackEXT> fDestroyDebugReportCallbackEXT; - - VkPtr<PFN_vkCmdSetDiscardRectangleEXT> fCmdSetDiscardRectangleEXT; } fFunctions; }; |