Commit 6408c552 by Chris Forbes

Add support for shader draw parameters query

We claim no support for now. Bug: b/117974925 Test: dEQP-VK.draw.shader_draw_parameters.* Change-Id: Id3b09419c365cc513dabf636a932c087b99f7cc3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29188 Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 96057765
...@@ -128,6 +128,11 @@ void PhysicalDevice::getFeatures(VkPhysicalDeviceProtectedMemoryFeatures* featur ...@@ -128,6 +128,11 @@ void PhysicalDevice::getFeatures(VkPhysicalDeviceProtectedMemoryFeatures* featur
features->protectedMemory = VK_FALSE; features->protectedMemory = VK_FALSE;
} }
void PhysicalDevice::getFeatures(VkPhysicalDeviceShaderDrawParameterFeatures* features) const
{
features->shaderDrawParameters = VK_FALSE;
}
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;
......
...@@ -37,6 +37,7 @@ public: ...@@ -37,6 +37,7 @@ public:
void getFeatures(VkPhysicalDevice8BitStorageFeaturesKHR* features) const; void getFeatures(VkPhysicalDevice8BitStorageFeaturesKHR* features) const;
void getFeatures(VkPhysicalDeviceMultiviewFeatures* features) const; void getFeatures(VkPhysicalDeviceMultiviewFeatures* features) const;
void getFeatures(VkPhysicalDeviceProtectedMemoryFeatures* features) const; void getFeatures(VkPhysicalDeviceProtectedMemoryFeatures* features) const;
void getFeatures(VkPhysicalDeviceShaderDrawParameterFeatures* features) const;
bool hasFeatures(const VkPhysicalDeviceFeatures& requestedFeatures) const; bool hasFeatures(const VkPhysicalDeviceFeatures& requestedFeatures) const;
const VkPhysicalDeviceProperties& getProperties() const; const VkPhysicalDeviceProperties& getProperties() const;
......
...@@ -2003,6 +2003,12 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physica ...@@ -2003,6 +2003,12 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physica
vk::Cast(physicalDevice)->getFeatures(&features); vk::Cast(physicalDevice)->getFeatures(&features);
} }
break; break;
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES:
{
auto& features = *reinterpret_cast<VkPhysicalDeviceShaderDrawParameterFeatures*>(extensionFeatures);
vk::Cast(physicalDevice)->getFeatures(&features);
}
break;
default: default:
// "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]" // "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]"
UNIMPLEMENTED("extensionFeatures->sType"); // TODO(b/119321052): UNIMPLEMENTED() should be used only for features that must still be implemented. Use a more informational macro here. UNIMPLEMENTED("extensionFeatures->sType"); // TODO(b/119321052): UNIMPLEMENTED() should be used only for features that must still be implemented. Use a more informational macro here.
......
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