diff mbox series

[meta-oe,scarthgap] vulkan-cts: allow vulkan versions > 1.3

Message ID 20250806162939.71883-2-rs@ti.com
State New
Headers show
Series [meta-oe,scarthgap] vulkan-cts: allow vulkan versions > 1.3 | expand

Commit Message

Randolph Sapp Aug. 6, 2025, 4:29 p.m. UTC
From: Randolph Sapp <rs@ti.com>

Backport a patch from upstream that allows vulkan-cts to work with
Vulkan version greater than 1.3. Previously any unknown Vulkan versions
will return 0 when we attempt to locate the minimum version with
minVulkanAPIVersion.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 ...e-CTS-with-unknown-versions-of-Vulka.patch | 41 +++++++++++++++++++
 .../vk-gl-cts/vulkan-cts_1.3.7.3.bb           |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch

Comments

Anuj Mittal Sept. 11, 2025, 9:07 a.m. UTC | #1
On Wed, 2025-08-06 at 11:29 -0500, Randolph Sapp via
lists.openembedded.org wrote:
> From: Randolph Sapp <rs@ti.com>
> 
> Backport a patch from upstream that allows vulkan-cts to work with
> Vulkan version greater than 1.3. Previously any unknown Vulkan
> versions
> will return 0 when we attempt to locate the minimum version with
> minVulkanAPIVersion.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>  ...e-CTS-with-unknown-versions-of-Vulka.patch | 41
> +++++++++++++++++++
>  .../vk-gl-cts/vulkan-cts_1.3.7.3.bb           |  1 +
>  2 files changed, 42 insertions(+)
>  create mode 100644 meta-oe/recipes-graphics/vk-gl-cts/vulkan-
> cts/0001-Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch
> 
> diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-
> Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch b/meta-
> oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-Allow-running-the-CTS-
> with-unknown-versions-of-Vulka.patch
> new file mode 100644
> index 0000000000..2797acf416
> --- /dev/null
> +++ b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-Allow-
> running-the-CTS-with-unknown-versions-of-Vulka.patch
> @@ -0,0 +1,41 @@
> +From 954b523a998933b1edbe9af3fe7b1c74595cf148 Mon Sep 17 00:00:00
> 2001
> +From: Lorenzo Dal Col <lorenzo@khronosgroup.org>
> +Date: Tue, 17 Sep 2024 17:18:20 +0200
> +Subject: [PATCH] Allow running the CTS with unknown versions of
> Vulkan in the
> + driver
> +
> +This will default to VK_API_MAX_FRAMEWORK_VERSION, which at this
> time is 1.3.x.
> +VK-GL-CTS issue: 5165
> +Components: Framework, Vulkan
> +Affects: None
> +
> +Change-Id: I954d0144db9ff5f3848c81df61dd263505b17ac2
> +Upstream-Status: Backport
> [https://github.com/KhronosGroup/VK-GL-CTS/commit/609c09b3163d86d7e48
> 19fbfc00a616e364f14f0]

It looks like this will be needed for walnascar as well.

Thanks,

Anuj

> +Signed-off-by: Randolph Sapp <rs@ti.com>
> +---
> + external/vulkancts/framework/vulkan/vkApiVersion.cpp | 9 ++++++++-
> + 1 file changed, 8 insertions(+), 1 deletion(-)
> +
> +diff --git a/external/vulkancts/framework/vulkan/vkApiVersion.cpp
> b/external/vulkancts/framework/vulkan/vkApiVersion.cpp
> +index d996cb0e6..8720df52a 100644
> +--- a/external/vulkancts/framework/vulkan/vkApiVersion.cpp
> ++++ b/external/vulkancts/framework/vulkan/vkApiVersion.cpp
> +@@ -134,7 +134,14 @@ deUint32 minVulkanAPIVersion(deUint32 lhs,
> deUint32 rhs)
> + 	for (auto it = begin(commonPredecessors); it !=
> end(commonPredecessors); ++it)
> + 		if (isApiVersionPredecessor(rhs, *it) &&
> isApiVersionPredecessor(lhs, *it))
> + 			return *it;
> +-	return 0;
> ++
> ++#ifndef CTS_USES_VULKANSC
> ++    // If we got to this point, it means we are dealing with an
> unknown version.
> ++    // We assume it to be valid, and we default to
> VK_API_MAX_FRAMEWORK_VERSION which is generated from the spec.
> ++    return VK_API_MAX_FRAMEWORK_VERSION;
> ++#else
> ++    return VKSC_API_MAX_FRAMEWORK_VERSION;
> ++#endif
> + }
> + 
> + } // vk
> +-- 
> +2.50.1
> +
> diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb
> b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb
> index 7492fe9aa4..cc80549eeb 100644
> --- a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb
> +++ b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb
> @@ -19,6 +19,7 @@ SRCREV_video-parser =
> "138bbe048221d315962ddf8413aa6a08cc62a381"
>  
>  SRC_URI +=
> "file://0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.pat
> ch \
>              file://0001-vulkan-cts-include-missing-cstdint.patch \
> +           
> file://0001-Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch
>  \
>  "
>  
>  TOOLCHAIN = "gcc"
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#118893):
> https://lists.openembedded.org/g/openembedded-devel/message/118893
> Mute This Topic: https://lists.openembedded.org/mt/114568946/3616702
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe:
> https://lists.openembedded.org/g/openembedded-devel/unsub [
> anuj.mittal@intel.com]
> -=-=-=-=-=-=-=-=-=-=-=-
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch
new file mode 100644
index 0000000000..2797acf416
--- /dev/null
+++ b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch
@@ -0,0 +1,41 @@ 
+From 954b523a998933b1edbe9af3fe7b1c74595cf148 Mon Sep 17 00:00:00 2001
+From: Lorenzo Dal Col <lorenzo@khronosgroup.org>
+Date: Tue, 17 Sep 2024 17:18:20 +0200
+Subject: [PATCH] Allow running the CTS with unknown versions of Vulkan in the
+ driver
+
+This will default to VK_API_MAX_FRAMEWORK_VERSION, which at this time is 1.3.x.
+VK-GL-CTS issue: 5165
+Components: Framework, Vulkan
+Affects: None
+
+Change-Id: I954d0144db9ff5f3848c81df61dd263505b17ac2
+Upstream-Status: Backport [https://github.com/KhronosGroup/VK-GL-CTS/commit/609c09b3163d86d7e4819fbfc00a616e364f14f0]
+Signed-off-by: Randolph Sapp <rs@ti.com>
+---
+ external/vulkancts/framework/vulkan/vkApiVersion.cpp | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/external/vulkancts/framework/vulkan/vkApiVersion.cpp b/external/vulkancts/framework/vulkan/vkApiVersion.cpp
+index d996cb0e6..8720df52a 100644
+--- a/external/vulkancts/framework/vulkan/vkApiVersion.cpp
++++ b/external/vulkancts/framework/vulkan/vkApiVersion.cpp
+@@ -134,7 +134,14 @@ deUint32 minVulkanAPIVersion(deUint32 lhs, deUint32 rhs)
+ 	for (auto it = begin(commonPredecessors); it != end(commonPredecessors); ++it)
+ 		if (isApiVersionPredecessor(rhs, *it) && isApiVersionPredecessor(lhs, *it))
+ 			return *it;
+-	return 0;
++
++#ifndef CTS_USES_VULKANSC
++    // If we got to this point, it means we are dealing with an unknown version.
++    // We assume it to be valid, and we default to VK_API_MAX_FRAMEWORK_VERSION which is generated from the spec.
++    return VK_API_MAX_FRAMEWORK_VERSION;
++#else
++    return VKSC_API_MAX_FRAMEWORK_VERSION;
++#endif
+ }
+ 
+ } // vk
+-- 
+2.50.1
+
diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb
index 7492fe9aa4..cc80549eeb 100644
--- a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb
+++ b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb
@@ -19,6 +19,7 @@  SRCREV_video-parser = "138bbe048221d315962ddf8413aa6a08cc62a381"
 
 SRC_URI += "file://0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch \
             file://0001-vulkan-cts-include-missing-cstdint.patch \
+            file://0001-Allow-running-the-CTS-with-unknown-versions-of-Vulka.patch \
 "
 
 TOOLCHAIN = "gcc"