Commit e1cda391 by Alexis Hetu Committed by Alexis Hétu

vkGetPhysicalDeviceFeatures2 fix

A mistake found its way into the previous "Provoking vertex fixes" cl. This cl fixes the vkGetPhysicalDeviceFeatures2 function for the VK_EXT_provoking_vertex extension. Bug: angleproject:3677, angleproject:3430 Change-Id: I561361f3fd2c3f6b7ca524614b7d7af461cc12d4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/37710 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent b07147b0
...@@ -144,6 +144,11 @@ void PhysicalDevice::getFeatures(VkPhysicalDeviceLineRasterizationFeaturesEXT* f ...@@ -144,6 +144,11 @@ void PhysicalDevice::getFeatures(VkPhysicalDeviceLineRasterizationFeaturesEXT* f
features->stippledSmoothLines = VK_FALSE; features->stippledSmoothLines = VK_FALSE;
} }
void PhysicalDevice::getFeatures(VkPhysicalDeviceProvokingVertexFeaturesEXT* features) const
{
features->provokingVertexLast = VK_TRUE;
}
VkSampleCountFlags PhysicalDevice::getSampleCounts() const VkSampleCountFlags PhysicalDevice::getSampleCounts() const
{ {
return VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT; return VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT;
......
...@@ -44,6 +44,7 @@ public: ...@@ -44,6 +44,7 @@ public:
void getFeatures(VkPhysicalDeviceProtectedMemoryFeatures* features) const; void getFeatures(VkPhysicalDeviceProtectedMemoryFeatures* features) const;
void getFeatures(VkPhysicalDeviceShaderDrawParameterFeatures* features) const; void getFeatures(VkPhysicalDeviceShaderDrawParameterFeatures* features) const;
void getFeatures(VkPhysicalDeviceLineRasterizationFeaturesEXT* features) const; void getFeatures(VkPhysicalDeviceLineRasterizationFeaturesEXT* features) const;
void getFeatures(VkPhysicalDeviceProvokingVertexFeaturesEXT* features) const;
bool hasFeatures(const VkPhysicalDeviceFeatures& requestedFeatures) const; bool hasFeatures(const VkPhysicalDeviceFeatures& requestedFeatures) const;
const VkPhysicalDeviceProperties& getProperties() const; const VkPhysicalDeviceProperties& getProperties() const;
......
...@@ -2424,14 +2424,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physica ...@@ -2424,14 +2424,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physica
break; break;
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT:
{ {
const VkPhysicalDeviceProvokingVertexFeaturesEXT* provokingVertexFeatures = reinterpret_cast<const VkPhysicalDeviceProvokingVertexFeaturesEXT*>(extensionFeatures); auto& features = *reinterpret_cast<VkPhysicalDeviceProvokingVertexFeaturesEXT*>(extensionFeatures);
vk::Cast(physicalDevice)->getFeatures(&features);
// Provoking vertex is supported.
// provokingVertexFeatures->provokingVertexLast can be VK_TRUE or VK_FALSE.
// No action needs to be taken on our end in either case; it's the apps responsibility to check
// that the provokingVertexLast feature is enabled before using the provoking vertex convention.
(void)provokingVertexFeatures->provokingVertexLast;
} }
break;
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT:
ASSERT(!HasExtensionProperty(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME, deviceExtensionProperties, ASSERT(!HasExtensionProperty(VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME, deviceExtensionProperties,
sizeof(deviceExtensionProperties) / sizeof(deviceExtensionProperties[0]))); sizeof(deviceExtensionProperties) / sizeof(deviceExtensionProperties[0])));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment