Module: Mesa
Branch: main
Commit: 297fda6cf13c5f1672f235c65d8b437a1c64f882
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=297fda6cf13c5f1672f235c65d8b437a1c64f882

Author: Philipp Zabel <[email protected]>
Date:   Thu Feb 23 15:54:15 2023 +0100

zink: fix build with -Dvulkan-beta=true

Fix a build error with -Dvulkan-beta=true:

  ../src/gallium/drivers/zink/zink_screen.c: In function 
‘zink_internal_create_screen’:
  ../src/gallium/drivers/zink/zink_screen.c:2764:20: error: ‘struct 
zink_device_info’ has no member named ‘have_KHR_portability_subset’
   2764 |    if (screen->info.have_KHR_portability_subset) {
        |                    ^
  ../src/gallium/drivers/zink/zink_screen.c:2765:60: error: ‘struct 
zink_device_info’ has no member named ‘portability_subset_feats’
   2765 |       screen->have_triangle_fans = (VK_TRUE == 
screen->info.portability_subset_feats.triangleFans);
        |                                                            ^

Fixes: e02cdb397e62 ("zink: prefer vulkan_core.h over vulkan.h")
Signed-off-by: Philipp Zabel <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21491>

---

 src/gallium/drivers/zink/zink_device_info.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_device_info.py 
b/src/gallium/drivers/zink/zink_device_info.py
index 1c2b8287a8b..17009b206f3 100644
--- a/src/gallium/drivers/zink/zink_device_info.py
+++ b/src/gallium/drivers/zink/zink_device_info.py
@@ -349,6 +349,10 @@ header_code = """
 
 #include <vulkan/vulkan_core.h>
 
+#ifdef VK_ENABLE_BETA_EXTENSIONS
+#include <vulkan/vulkan_beta.h>
+#endif
+
 #ifdef _WIN32
 #include <windows.h>
 #include <vulkan/vulkan_win32.h>

Reply via email to