diff options
author | Andrew Woloszyn <awoloszyn@google.com> | 2023-10-11 16:17:03 +0000 |
---|---|---|
committer | Andrew Woloszyn <awoloszyn@google.com> | 2023-10-11 16:18:49 +0000 |
commit | baa04b02c7de0244ebee5fb0fea56cef6323b50a (patch) | |
tree | 19e64e83507ba3101b4f40e8346ffe9e894a791f | |
parent | bc31dd1251e489a518922de67a1c2f24d7928b7f (diff) | |
download | goldfish-opengl-baa04b02c7de0244ebee5fb0fea56cef6323b50a.tar.gz |
Fix for dEQP-VK.*.extended_dynamic_state.*.enable_raster
Test: ran dEQP CTS
Bug: 304772901
Merged-In: If0c1896c6acef97db9ec3ae3abfe88eea333b42f
Change-Id: Id75135ff779412cedf94b5e8319839d51bd03167
-rw-r--r-- | system/vulkan_enc/goldfish_vk_counting_guest.cpp | 14 | ||||
-rw-r--r-- | system/vulkan_enc/goldfish_vk_marshaling_guest.cpp | 13 | ||||
-rw-r--r-- | system/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp | 13 |
3 files changed, 30 insertions, 10 deletions
diff --git a/system/vulkan_enc/goldfish_vk_counting_guest.cpp b/system/vulkan_enc/goldfish_vk_counting_guest.cpp index ed2e2300..e9529d84 100644 --- a/system/vulkan_enc/goldfish_vk_counting_guest.cpp +++ b/system/vulkan_enc/goldfish_vk_counting_guest.cpp @@ -1558,10 +1558,16 @@ void count_VkGraphicsPipelineCreateInfo(uint32_t featureBits, VkStructureType ro (void)count; uint32_t hasRasterization = 1; if (featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { - hasRasterization = (((0 == toCount->pRasterizationState)) - ? (0) - : (!((*(toCount->pRasterizationState)).rasterizerDiscardEnable))); - *count += 4; + hasRasterization = + ((((0 == toCount->pRasterizationState)) + ? (0) + : (!((*(toCount->pRasterizationState)).rasterizerDiscardEnable))) || + (((0 == toCount->pDynamicState)) + ? (0) + : (arrayany((*(toCount->pDynamicState)).pDynamicStates, 0, + (*(toCount->pDynamicState)).dynamicStateCount, [](VkDynamicState s) { + return (s == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE); + })))); } uint32_t hasTessellation = 1; if (featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { diff --git a/system/vulkan_enc/goldfish_vk_marshaling_guest.cpp b/system/vulkan_enc/goldfish_vk_marshaling_guest.cpp index ac438807..730b8eee 100644 --- a/system/vulkan_enc/goldfish_vk_marshaling_guest.cpp +++ b/system/vulkan_enc/goldfish_vk_marshaling_guest.cpp @@ -2808,9 +2808,16 @@ void marshal_VkGraphicsPipelineCreateInfo(VulkanStreamGuest* vkStream, VkStructu uint32_t hasRasterization = 1; if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { hasRasterization = - (((0 == forMarshaling->pRasterizationState)) - ? (0) - : (!((*(forMarshaling->pRasterizationState)).rasterizerDiscardEnable))); + ((((0 == forMarshaling->pRasterizationState)) + ? (0) + : (!((*(forMarshaling->pRasterizationState)).rasterizerDiscardEnable))) || + (((0 == forMarshaling->pDynamicState)) + ? (0) + : (arrayany((*(forMarshaling->pDynamicState)).pDynamicStates, 0, + (*(forMarshaling->pDynamicState)).dynamicStateCount, + [](VkDynamicState s) { + return (s == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE); + })))); uint32_t cgen_var_0 = (uint32_t)hasRasterization; vkStream->putBe32(cgen_var_0); } diff --git a/system/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp b/system/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp index d06ebd9f..1676c86a 100644 --- a/system/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp +++ b/system/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp @@ -2117,9 +2117,16 @@ void reservedmarshal_VkGraphicsPipelineCreateInfo(VulkanStreamGuest* vkStream, uint32_t hasRasterization = 1; if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { hasRasterization = - (((0 == forMarshaling->pRasterizationState)) - ? (0) - : (!((*(forMarshaling->pRasterizationState)).rasterizerDiscardEnable))); + ((((0 == forMarshaling->pRasterizationState)) + ? (0) + : (!((*(forMarshaling->pRasterizationState)).rasterizerDiscardEnable))) || + (((0 == forMarshaling->pDynamicState)) + ? (0) + : (arrayany((*(forMarshaling->pDynamicState)).pDynamicStates, 0, + (*(forMarshaling->pDynamicState)).dynamicStateCount, + [](VkDynamicState s) { + return (s == VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE); + })))); uint32_t cgen_var_0 = (uint32_t)hasRasterization; memcpy((*ptr), &cgen_var_0, 4); android::base::Stream::toBe32((uint8_t*)(*ptr)); |