On Wed, Dec 08, 2021 at 01:36:59PM +0000, v...@openbsd.org wrote:
> bulk build on octeon.ports.openbsd.org
> started on  Wed Dec 1 15:51:19 UTC 2021
> finished at Wed Dec 8 13:29:09 UTC 2021
> lasted 07D21h37m
> done with kern.version=OpenBSD 7.0-current (GENERIC.MP) #763: Tue Nov 30 
> 18:56:02 MST 2021

[...]

> http://build-failures.rhaalovely.net/mips64/2021-12-01/graphics/vulkan-validation-layers.log

/pobj/vulkan-validation-layers-1.2.189.1/Vulkan-ValidationLayers-sdk-1.2.189.1/layers/best_practices_utils.cpp:390:20:
 error: expected unqualified-id
        for (auto& mips : state.usages) {
                   ^
<built-in>:340:14: note: expanded from here
#define mips 1
             ^

This looks like a silly namespace collision to run into. The diff below
avoids this with s/mips/vk_mips/g.

Planning to commit this if no objection. oks and comments still welcome!

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/vulkan-validation-layers/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile    9 Dec 2021 04:48:32 -0000       1.11
+++ Makefile    10 Dec 2021 21:51:22 -0000
@@ -7,6 +7,7 @@ PKGNAME =       vulkan-validation-layers-${V}
 GH_TAGNAME =   sdk-${V}
 GH_ACCOUNT =   KhronosGroup
 GH_PROJECT =   Vulkan-ValidationLayers
+REVISION =     0
 
 CATEGORIES =   devel graphics
 
Index: patches/patch-layers_best_practices_utils_cpp
===================================================================
RCS file: patches/patch-layers_best_practices_utils_cpp
diff -N patches/patch-layers_best_practices_utils_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-layers_best_practices_utils_cpp       10 Dec 2021 21:51:22 
-0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+avoid 'mips' namespace collision with <built-in> on mips64
+
+Index: layers/best_practices_utils.cpp
+--- layers/best_practices_utils.cpp.orig
++++ layers/best_practices_utils.cpp
+@@ -376,8 +376,8 @@ IMAGE_STATE_BP* BestPractices::GetImageUsageState(VkIm
+         IMAGE_STATE* image = Get<IMAGE_STATE>(vk_image);
+         state.image = image;
+         state.usages.resize(image->createInfo.arrayLayers);
+-        for (auto& mips : state.usages) {
+-            mips.resize(image->createInfo.mipLevels, 
IMAGE_SUBRESOURCE_USAGE_BP::UNDEFINED);
++        for (auto& vk_mips : state.usages) {
++            vk_mips.resize(image->createInfo.mipLevels, 
IMAGE_SUBRESOURCE_USAGE_BP::UNDEFINED);
+         }
+         return &state;
+     }

Reply via email to