Support compiling with older SDK headers

This commit is contained in:
kd-11 2022-12-10 19:30:47 +03:00 committed by kd-11
parent 780c38a5e5
commit 577b5ef2bd
3 changed files with 27 additions and 2 deletions

View File

@ -1,6 +1,5 @@
#include "stdafx.h" #include "stdafx.h"
#include "Utilities/StrFmt.h" #include "Utilities/StrFmt.h"
#include "../Common/simple_array.hpp"
#include "GLSLCommon.h" #include "GLSLCommon.h"
#include "RSXFragmentProgram.h" #include "RSXFragmentProgram.h"

View File

@ -22,7 +22,7 @@
#include <util/types.hpp> #include <util/types.hpp>
#if VK_HEADER_VERSION < 224 #ifndef VK_EXT_attachment_feedback_loop_layout
#define VK_EXT_attachment_feedback_loop_layout 1 #define VK_EXT_attachment_feedback_loop_layout 1
#define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME "VK_EXT_attachment_feedback_loop_layout" #define VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME "VK_EXT_attachment_feedback_loop_layout"
@ -37,3 +37,24 @@ typedef struct VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT {
} VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT; } VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT;
#endif #endif
#ifndef VK_KHR_fragment_shader_barycentric
#define VK_KHR_fragment_shader_barycentric 1
#define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1
#define VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_KHR_fragment_shader_barycentric"
#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR static_cast<VkStructureType>(1000203000)
typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR {
VkStructureType sType;
void* pNext;
VkBool32 fragmentShaderBarycentric;
} VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR;
typedef struct VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR {
VkStructureType sType;
void* pNext;
VkBool32 triStripVertexOrderIndependentOfProvokingVertex;
} VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR;
#endif

View File

@ -464,6 +464,11 @@ namespace vk
requested_extensions.push_back(VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME); requested_extensions.push_back(VK_EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME);
} }
if (pgpu->barycoords_support)
{
requested_extensions.push_back(VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME);
}
enabled_features.robustBufferAccess = VK_TRUE; enabled_features.robustBufferAccess = VK_TRUE;
enabled_features.fullDrawIndexUint32 = VK_TRUE; enabled_features.fullDrawIndexUint32 = VK_TRUE;
enabled_features.independentBlend = VK_TRUE; enabled_features.independentBlend = VK_TRUE;